Score:0

How does OCSP handle deleted certificates?

sr flag

We have a Microsoft Certificate Authority running on Windows Server 2019. We are issuing certificates to Android devices via a MDM. The Android device users browse to a web application (hosted by Apache, implemented in PHP 8) using the Chrome web browser (on Android) that requires a client certificate.

We are installing a separate Windows Server 2019 instance with the Microsoft OCSP Responder role to validate/verify that the client certificates presented to the Apache web server are valid. Apache has several directives to handle OCSP validation. We'd also like to validate the certificates in PHP for further security.

From my research reading several RFCs and Microsoft technical documents, it seeems like the Microsoft OCSP Responder validates certificates by referencing against a CRL for revocation status.

How does the Microsoft OCSP Responder validate certificates if they have been deleted from the CA instead of revoked? If deleted and not revoked, they will not show up in the CRL.

Am I missing something here? Will the Microsoft OCSP Responder validate the serial number against the CA database as well as its revocation status?

Score:1
cn flag

Will the Microsoft OCSP Responder validate the serial number against the CA database as well as its revocation status?

by default, Microsoft OCSP will report such serial number as "Good". Starting with Windows Server 2008 R2, a deterministic OCSP response functionality is added to Microsoft OCSP. In short, CA publish all serial numbers of ever issued certificates and OCSP is configured to look into this directory as well. New behavior does the following:

  • if serial number does not exist in the folder, OCSP responds with UNKNOWN status. This means that requested serial number was never issued by CA
  • if serial number exist in the folder, a CRL is checked
  • if serial is listed in CRL, respond with REVOKED status and respond with GOOD otherwise.

More details on Microsoft KB: The Online Responder service does not return a deterministic GOOD for all certificates not included in the CRL

The KB contains a script which dumps all serial numbers of issued certificates into configured folder. However the script is a bit flawed. It exports only serials that exist in CA database at script execution time. CA database is maintained and old entries are deleted to prevent CA database overgrow. This will lead to false-positive UNKNOWN status on deleted certs although the cert was issued and exist somewhere in the wild. I prefer to keep everything issued regardless of CA maintenance and respond with GOOD even if cert was deleted from CA. To address this flaw, I would recommend to remove these lines from the script:

dir | foreach {
    remove-item $_ -force
}

this will keep serial numbers that no longer exist on CA between script runs.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.