CertEnroll IX509CertificateRequestCMC.Encode is returning CERTSRV_E_PROPERTY_EMPTY
I am trying to create a certificate request with archivable keys on windows 2008 server against a Microsoft 2008 CA.
First we obtain the CA Exchange Certificate using
ICertRequest2.GetCACertificate(TRUE, CAPath, 0, &Certificate)
I then create an IX509CertificateRequestPkcs10 object and add the certificate details. I use this to initialise an IX509CertificateRequestCmc with InitializeFromInnerRequest.
I then call IX509CertificateRequestCmc.put_KeyArchivalCertificate with the CA Exchange Certificate I obtained earlier.
When I then call Encode() on the IX509CertificateRequestCmc object it returns CERTSRV_E_PROPERTY_EMPTY.
I can't work out what property is needed or whether this is related to the CA itself or the server.
August 28th, 2009 10:59am
Hi,
Please verify that the CA has been configured for key archival.
Implementing Key Archival Walkthrough
http://technet.microsoft.com/en-us/library/cc738977(WS.10).aspx
If all the settings are correct, please request a certificate by using Certreq.exe in order to narrow down the cause of the issue:
Certreq.exe Syntax
http://technet.microsoft.com/en-us/library/cc736326(WS.10).aspx
If you can request a certificate by using Certreq.exe, the issue is more related to development. I suggest that you post to MSDN forum for further investigation.
MSDN Forum
http://forums.microsoft.com/MSDN/default.aspx?SiteID=1
Thanks.This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2009 10:59am
Thanks for the reply. I'm fairly sure its down to our development with the CertEnroll libraries, as we can request archived certs from this CA from a Windows 2003 server using XEnroll.I'll try posting this on the C++ forum.Thanks again.
September 3rd, 2009 1:59pm