ca cert revoke problem

D

doronb

hello all
i wrote a c# application thta manage Active directory users
as part of this app i have to delete user and revoke their
cretficate
the certficate is an CA and is the issued be other application
as you can see this is the revoke method

private bool RevokeCertificate(DirectoryEntry Entry)
{
DateTime issueDate
try
{


System.Security.Cryptography.X509Certificates.X509Certificate2
X509Cert =
new
System.Security.Cryptography.X509Certificates.X509Certificate2((byte[])
Entry.Properties["userCertificate"][0])
CERTADMINLib.CCertAdminClass certAdmin = new
CERTADMINLib.CCertAdminClass()
string strConfig =
configurationBase.GetConfigParamValueByParamName("CAName")
string strSert = X509Cert.GetSerialNumberString()
issueDate = X509Cert.NotBefore
//PrintParameters(strConfig,strSert)
certAdmin.RevokeCertificate(strConfig, strSert, 0,
DateTime.UtcNow.Date)

}
catch (Exception ex)
{
MessageBox.Show(ex.Message)

return false
}

return true
}

the problem is that the revoke get an error message in the
revokeCertificate
"Access is Denied. (Exception from HRESULT: 0x80070005
(E_ACCESSDENIED))

1) ? does any one know about any problem in the MS revoke method
2) Any other way to rekove a certtficate
 
Back
Top Bottom