My question is similar to this question.
I am trying to check revocation list only using the local CRL.
I am using X509Chain.Build() with the following parameters:
var chainMachine = new X509Chain(true);
chainMachine.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain;
chainMachine.ChainPolicy.UrlRetrievalTimeout = TimeSpan.FromSeconds(30);
chainMachine.ChainPolicy.VerificationFlags = X509VerificationFlags.NoFlag;
chainMachine.ChainPolicy.VerificationTime = DateTime.Now;
chainMachine.ChainPolicy.RevocationMode = X509RevocationMode.Offline;
But i get the following errors:
- RevocationStatusUnknown => The revocation function is unable to check revocation for the certificate.
- OfflineRevocation => The Revocation function was unable to check revocation for the certificate because the revocation server is offline.
The weird thing is that once I try to check the revocation list online (as a result the CRL will be updated), the issue is resolved. so it looks that once there is anything in the cache the issue cannot be reproduced anymore.
I thought that maybe the error message is incorrect and what actually happens is that when the cache is empty there is some exception that causes this message to pop up. another option is that maybe there is some flag that saying whether the cache has been updated sometime, and if it has never been updated it tries to get the info from an outside server
can anyone point out what is the reason for this issue?