我在 Windows Server 2003 上有 ASP.NET Web 服务。我有自己的证书颁发机构。我在 Web 服务中使用自己的客户端证书进行身份验证。我制作客户证书。我打电话给网络服务,一切都很好。然后我在证书颁发机构吊销此证书。证书在吊销证书中。我用这个证书调用 web 服务,但是 web 服务验证这个证书是好的,但是这个证书在被撤销之间。我不知道为什么?有人帮我吗?
我在验证证书上使用此方法。
X509Certificate2.Verify 方法
我没有得到任何异常,证书在被吊销之间,但网络服务验证此证书是好的。
致克劳斯比斯科夫:谢谢。所以我试试这个:
public void CreateUser(X509Certificate2 cert)
{
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
if (VefiryCert(cert))
{
//...
}
}
但是被吊销的证书仍然验证为好