我想手動進行x509證書根驗證。我用BouncyCastle圖書館。我在x 509根證書驗證
以下添加了命名空間using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
使用Org.BouncyCastle.Asn1;
使用Org.BouncyCastle.Asn1.Utilities;
使用Org.BouncyCastle.Asn1.X509;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Math;
使用Org.BouncyCastle.Security;
使用Org.BouncyCastle.Security.Certificates;
使用Org.BouncyCastle.Utilities;
使用Org.BouncyCastle.Utilities.Collections;
using Org.BouncyCastle.Utilities.Date;
使用Org.BouncyCastle.Utilities.Encoders;
使用Org.BouncyCastle.X509.Extension;
,我叫下面
public static bool CertificateIssuerControl(X509Certificate2 certificate2Control, X509Certificate2 IssuerCertificate)
{
string signName = X509SignatureUtilities.GetSignatureName(certificate2Control.SignatureAlgorithm);
ISigner signature = SignerUtilities.GetSigner(signName);
return true;
}
,我採取的方法錯誤「名稱‘X509SignatureUtilities’不在當前情況下存在」
我該如何解決這個問題?
謝謝您的任何建議...
您是否在項目參考中添加了庫DLL文件? – 2010-11-30 08:14:07