Quantcast
Channel: Public Key Infrastructure PowerShell module
Viewing all articles
Browse latest Browse all 729

New Post: OCSPRequest throws exception when certificate's algorithm is MD5

$
0
0
MSCOMCTL.OCX

This file's certificate of counter signer has been signed with MD5 algorithm and when I try to call OCSPRequest, the exception occurs with the message "Issuer for the speified certificate not found."

I extracted certificate(X509Certificate2) of counter signer by refering this link.
var signedCms = new SignedCms();
signedCms.Decode(vData);

foreach (var signerInfo in signedCms.SignerInfos)
{
    foreach (var unsignedAttribute in signerInfo.UnsignedAttributes)
    {
        if (unsignedAttribute.Oid.Value != szOID_RSA_counterSign) continue;
        foreach (var counterSignInfo in signerInfo.CounterSignerInfos)
        {
            counterCertificate = counterSignInfo.Certificate;   // Certificate of counter signer
        }
    }
}
I looked into the source code and found that CertID::m_initialize(X509Certificate2 cert) in PKI.OCSP.CertID.cs regards that the algorithm is always SHA1. I think this made exception but not sure.

I used current version of module (3.1.0) and the version of the source code I looked into is 3.1.0, too.

What should I do?

Viewing all articles
Browse latest Browse all 729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>