1

少し問題があります。Windows Server 2003 で認証局を使用し、クライアント証明書を取り消しました。クライアント証明書は失効した証明書にあります。Windows Server 2003 の winform アプリで、失効時にこのクライアント証明書を確認してみます。コードは次のとおりです。

private bool VefiryCert(X509Certificate2 cert)
{
    X509Chain chain = new X509Chain();
    chain.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain;
    chain.ChainPolicy.RevocationMode =
         X509RevocationMode.Online;
    chain.ChainPolicy.UrlRetrievalTimeout = new TimeSpan(0, 0, 1000);
    chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllFlags; X509VerificationFlags.AllowUnknownCertificateAuthority;
    return chain.Build(cert);
}

But this client certificate is verify as true. 混乱しています。どこに問題があるのでしょうか? winform アプリケーションにロードされ、このクライアント証明書の検証に使用される失効リストを確認するにはどうすればよいですか?

したがって、問題は、メソッド VefiryCert を使用して (証明機関の) 失効リストにあるクライアント証明書を検証すると、証明書が TRUE として検証されることです。

誰かが私を助けることができますか?

4

1 に答える 1

0

サーバーで同様の問題が発生しました。への電話であることがわかりました

ServicePointManager.CheckCertificateRevocationList = true;

例外を見ることができました

failed: System.ServiceModel.Security.SecurityNegotiationException : Could not establish trust relationship for the SSL/TLS secure channel with authority 'XXX.XXX.net'.  
----> System.Net.WebException : The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.  
----> System.Security.Authentication.AuthenticationException : The remote certificate is invalid according to the validation procedure.
于 2009-12-31T14:40:51.643 に答える