Hi,
I’m currently looking at adding ocsp requests as part of my Windows GUI https://certifytheweb.com in order to faciliate a scan for revoked certs.
Currently if I try to query http://ocsp.int-x3.letsencrypt.org (for instance) the response hangs with no result (same for staging) but if I use another responder (e.g. http://ocsp.digicert.com) I get an instant Unauthorized oscp response (as expected).
Is oscp just super slow or does a certain path for the current ocsp responder just do nothing in it’s response (not http status code, or perhaps not closing the response stream?). There’s a possibility my request is malformed in some way but that probably shouldn’t result in no response (as I presume I’m starving the server of a socket while I wait for no response to come).
It uses the BouncyCastle OcspRequest/Response objects and generators then posts it to the ocsp endpoint and expects a response. I could maybe try doing a GET instead if that would make any difference.
NotTimeValid: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.
OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.
That check is one hour old. ~~4000 checks of Letsencrypt certificates (but not all domains have LE-certificates).
So - yes, looks like the OCSP hangs sometimes. That's not an own written check, that's the integrated .NET-check.
results in the program no longer hanging - instead it is continuing to crash elsewhere (for unrelated reasons - I think the program expects the issuer certificate to be bundled in the OCSP response, but Let’s Encrypt doesn’t attach one to save bandwidth, so the program throws the bounds exception):
root@df80dcde1fdf:~/BouncyCastleExamples/OcspClient# mono bin/Debug/OcspClient.exe
Querying 'http://ocsp.int-x3.letsencrypt.org'...
Unhandled Exception:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at ReisJr.BouncyCastle.Examples.OcspClient.ValidateResponse (Org.BouncyCastle.Ocsp.BasicOcspResp or, Org.BouncyCastle.X509.X509Certificate issuerCert) [0x00017] in <aac126ae196b4db7a0d3467188803f88>:0
Maybe finding some examples that aren’t from 2012 would be better.
I tried using the (.net) X509Chain build to check for revocation status initially but it just instantly came back saying something about the CRL being offline so I don’t know if it attempts an Oscp check.
Do you use the Bouncy castle ocsp libraries for your check or do you have another method (.net framework)? There seems to be zero docs for BouncyCastle examples and some stuff on the java side dates back to 2005.