Configure deterministic "Good" for the Online Responder (OCSP)
In the default configuration, the Online Responder returns the status "Good" for requested certificates that do not appear on one of the configured certificate revocation lists.
This can be problematic because the Online Responder has no knowledge of the certificates issued by the certification authorities. If an attacker succeeds in issuing a certificate with the private key of the certification authority without its knowledge, the Online Responder would not detect this, and the certificate would also show up as "Good" in the audit log .
The Online Responder (Online Certificate Status Protocol, OCSP) is an alternative way of providing revocation status information for certificates. Thanks to OCSP, entities that want to check the revocation status of a certificate do not have to download the complete list of all revoked certificates, but can send a specific request for the certificate in question to the Online Responder. For a more detailed description, see the article "Basics: Online Responder (Online Certificate Status Protocol, OCSP) ".
See also RFC 6960 :
The "good" state indicates a positive response to the status inquiry. At a minimum, this positive response indicates that no certificate with the requested certificate serial number currently within its validity interval is revoked. This state does not necessarily mean that the certificate was ever issued or that the time at which the response was produced is within the certificate's validity interval.
How it works
Do you know TameMyCerts? TameMyCerts is an add-on for the Microsoft certification authority (Active Directory Certificate Services). It extends the function of the certification authority and enables the application of rule sets to realize the secure automation of certificate issuance. TameMyCerts is unique in the Microsoft ecosystem, has already proven itself in countless companies around the world and is available under a free license. It can be downloaded via GitHub and used free of charge. Professional maintenance is also offered.
The following steps are performed below:
- Export the serial numbers of the certificates issued by the certification authorities.
- Configure the Online Responder to use the exported serial numbers to check the certificate status.
The serial numbers of the issued certificates of the certification authorities concerned are exported as empty text files. The file name corresponds to the serial number of the certificate.
These files must be made available to the Online Responder. After it has been configured to search for the serial numbers in the configured directory, it will check for each requested certificate whether a file matching the serial number can be found.
Once the configuration is done, the Online Responder will behave as follows:
- For certificates whose serial numbers are found in one of the configured directories, the status "Good" is returned.
- For certificates whose serial numbers appear in one of the configured certificate revocation lists, the status "Revoked" is returned.
- For certificates to which neither of the two previous criteria applies, the status "Unknown" is returned.
Reliability of the solution
It is not guaranteed that all participants use the Online Responder. For example, in the following cases, the Online Responder may not be used:
- The checking application does not use OCSP.
- The certificate to be checked has no OCSP path in its Authority Information Access (AIA) extension. Since this can be determined by an attacker under certain circumstances , this is problematic when CDPs are provided.
- The OCSP Magic Number takes effect when CDPs are configured in the certificate (for example, for domain controllers that verify smart card logons). In this case, the application will prefer to use the certificate revocation list because it considers this more efficient.
It can only be ensured that OCSP is used in all cases if the issued certificates contain no CDP and the certificate revocation lists are not accessible anywhere.
Alternatively, it is also possible to instruct individual computers via Group Policy to use only the Online Responders for specific certification authorities .
Setup
Install hotfix
For Windows Server 2012 R2, the hotfix KB2967917 must be installed. Windows Server 2016 and newer already include the hotfix.
Export the serial numbers of the certificates issued by the certification authorities
Below is the sample script from the aforementioned Knowledge Base article.
param(
[ValidateScript({Test-Path $_})]
[String] $Path
)
pushd $Path
dir | foreach {
remove-item $_ -force
}
certutil.exe -out serialnumber -restrict "Disposition = 20" -view | foreach {
if ($_ -match 'Serial Number: "([^"]+)"') {
New-Item -type File $matches[1] | out-null
}
}
popdThe script must be run regularly to keep the information about issued certificates in sync.
Alternatively, it is possible and also more elegant to write an exit module for this purpose, which stores the serial numbers in the file system directly when a certificate is issued. See the article "Create an exit module for the certification authority in C# ".


Configure the Online Responder to use the exported serial numbers for checking the certificate status
For the Online Responder to be able to check the exported serial numbers, the respective revocation configuration must be configured accordingly. There is no graphical interface and no command line command for this. Instead, the path must be specified directly via a registry key.
To do this, use the Registry Editor to navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\OcspSvc\Responder\{Name-der-Sperrkonfiguration}\ProviderCreate a new multi-string value there.
Name it "IssuedSerialNumbersDirectories".

As its content, enter the configured path that contains the serial numbers.


Apply the changes
After the configuration is completed, the Online Responder service must be restarted.
Restart-Service OCSPSvcChecking the result
If auditing of the OCSP events is enabled and a certificate with an unknown serial number is requested for checking, the Online Responder now returns a status of "Unknown" (visible in event 5125 ).

For comparison: if no deterministic "Good" is configured, the same certificate results in a status of "Good".

