• 大小: 0.02M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: 接口  C#  微信  红包  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Security.Cryptography.X509Certificates;

namespace WeChatRedPacketSample
{
    public class CertificateStoreFinder : ICertificateFinder
    {
        string m_SubjectDistinguishedName;

        public CertificateStoreFinder(string subjectDistinguishedName)
        {
            if (subjectDistinguishedName == null)
                throw new ArgumentNullException(“subjectDistinguishedName“);

            m_SubjectDistinguishedName = subjectDistinguishedName;
        }

        public X509Certificate2 Find()
        {
            var store = new X509Store(StoreName.My StoreLocation.CurrentUser);
            store.Open(OpenFlags.ReadOnly);
            //你可以采用别的方式来寻找证书,只要能找到就可以。
            var certs = store.Certificates.Find(X509FindType.FindBySubjectDistinguishedN

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-03-30 12:44  WeChatRedPacketSample-master\
     文件        2518  2015-03-30 12:44  WeChatRedPacketSample-master\.gitattributes
     文件        2651  2015-03-30 12:44  WeChatRedPacketSample-master\.gitignore
     文件        1077  2015-03-30 12:44  WeChatRedPacketSample-master\LICENSE
     文件          55  2015-03-30 12:44  WeChatRedPacketSample-master\README.md
     目录           0  2015-03-30 12:44  WeChatRedPacketSample-master\src\
     文件        1010  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample.sln
     目录           0  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\
     文件         182  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\App.config
     文件        1045  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\CertificateStoreFinder.cs
     文件        1080  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\DebugWeChatClient.cs
     文件         178  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\ICertificateFinder.cs
     文件         162  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\IWeChatClient.cs
     文件        3140  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\Program.cs
     目录           0  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\Properties\
     文件        1418  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\Properties\AssemblyInfo.cs
     文件        1084  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\RedPacket.cs
     文件         189  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\RedPacketSentError.cs
     文件         324  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\RedPacketSentResult.cs
     文件        6797  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\RedPacketService.cs
     文件        1414  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\WeChatClient.cs
     文件        3700  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\WeChatRedPacketSample.csproj
     文件         229  2015-03-30 12:44  WeChatRedPacketSample-master\src\WeChatRedPacketSample\packages.config

评论

共有 条评论