Windows error 0x8009200A, -2146885622

Detailed Error Information

CRYPT_E_UNEXPECTED_MSG_TYPE[1]

MessageThe certificate does not have a property that references a private key.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode9 (0x009)
NameFACILITY_SSPI[2][1]
DescriptionThe source of the error code is the Security API layer.[2][1]
Error Code8202 (0x200a)

Questions

1vote
1answer

CRYPT_E_UNEXPECTED_MSG_TYPE when creating certificate using certenroll

I am trying to create a self signed cert using certenroll, but I appear to be getting something wrong with the CSignerCertificate::Initialize as it throws an error 0x8009200a CRYPT_E_UNEXPECTED_MSG_TYPE. 'MyCustomRoot' is the name of my self signed root certificate that is in the Current USer->Personal->Certificates store. public static X509Certificate2 CertOpen(string [...] read more
c#
https
x509certificate
x509certificate2
certenroll
0votes
1answer

Upgrading from makecert.exe to CertEnroll - issues with certificate trust

I have an app that up until now used makecert.exe to generate self certificates. However as makecert does't have the ability to add a SubjectAltName field, I am needing to migrate the code to certenroll.dll This is the original makecert code: public static X509Certificate2 MakeCert(string subjectName) { X509Certificate2 cert; string [...] read more
c#
ssl-certificate
x509certificate2
makecert
certenroll

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0