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
OK, I installed issuer certificate and request instance has successfully created.

But now I'm receiving unsatisfying response. I got following HttpHeaders and ResponseStatus is "Unauthorized". The rest properties are filled with default value like "false" or "null", etc...
-       response    {PKI.OCSP.OCSPResponse} PKI.OCSP.OCSPResponse
 +      HttpHeaders {content-transfer-encoding: binary
Proxy-Connection: keep-alive
Accept-Ranges: none
Content-Length: 5
Content-Type: application/ocsp-response
Date: Mon, 17 Aug 2015 05:34:54 GMT
Server: nginx/1.4.7
}   System.Net.WebHeaderCollection
Did my request delivered with no mistakes? My code was like below.
                try
                {
                    OCSPRequest request = new OCSPRequest(_mainCert, new Uri(url));
                    OCSPResponse response = request.SendRequest();
                    switch (response.Responses[0].CertStatus)
                    {
                        case CertificateStatus.Good:
                            AddCertNote("Available.");
                            return true;
                        case CertificateStatus.Revoked:
                            AddCertNote("Not avaliable.");
                            break;
                    }
                }
                catch (System.Exception ex)
                {

                }
Thank you for your help, @Camelot.

Viewing all articles
Browse latest Browse all 729

Trending Articles



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