is there a bug in CertAdminLib interop with RevokeCertificate() me

From: Sébastien PICAMELOT (SbastienPICAMELOT_at_discussions.microsoft.com)
Date: 12/15/04


Date: Wed, 15 Dec 2004 08:43:03 -0800

I handle certificates in a certificates store thanks to XEnroll,
CertClientLib and CertAdminLib. Almost all methods works fine... but I
encountered a problem with CertAdminLib.RevokeCertificate() method. Actually,
certificate revokation works without any problem, but I aim at unrevoking
certificate by using RevokeCertificate method, as explained on MSDN :

"If a currently revoked certificate has CRL_REASON_CERTIFICATE_HOLD as its
reason code, you can reinstate the certificate by calling RevokeCertificate
with MAXDWORD (defined in Winnt.h) as the value for its reason code (the
Reason parameter). After it is reinstated, the certificate will not appear in
future CRLs"

winnt.h defines MAXDWORD as follow : #define MAXDWORD 0xffffffff

Althoug, with dotNet, RevokeCertificate method reason code waits for an int.
So I can't use MAXDWORD. RevokeCertificate crash when reason code is
int.maxvalue. System.Convert.ToInt32 crash when its parameter is
0xffffffff... and compiler doesn't run if I use directly 0xffffffff or
System.Convert.ToInt64(0xffffffff)...

Is there a way to unrevoke a certificate in dotNet ?

-- 
C# developper


Relevant Pages

  • Is there a bug with CertAdminLib.RevokeCertificate() method ?
    ... certificate by using RevokeCertificate method, ... reason code, you can reinstate the certificate by calling RevokeCertificate ... Althoug, with dotNet, RevokeCertificate method reason code waits for an int. ... RevokeCertificate crash when reason code is ...
    (microsoft.public.security)
  • Is there a bug with CertAdminLib.RevokeCertificate() method ?
    ... certificate by using RevokeCertificate method, ... reason code, you can reinstate the certificate by calling RevokeCertificate ... Althoug, with dotNet, RevokeCertificate method reason code waits for an int. ... RevokeCertificate crash when reason code is ...
    (microsoft.public.security)