From c4ce06293c78345a7bfb9bde92b5df10dca6e47e Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Wed, 28 Oct 2009 10:48:02 -0700 Subject: [PATCH] crypt32: Create a V1 certificate if it doesn't have extensions. --- dlls/crypt32/cert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 2115913fa05..f88cf95d5c8 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -2807,7 +2807,10 @@ static void CRYPT_MakeCertInfo(PCERT_INFO info, const CRYPT_DATA_BLOB *pSerialNu assert(pSubjectIssuerBlob); assert(pubKey); - info->dwVersion = CERT_V3; + if (pExtensions && pExtensions->cExtension) + info->dwVersion = CERT_V3; + else + info->dwVersion = CERT_V1; info->SerialNumber.cbData = pSerialNumber->cbData; info->SerialNumber.pbData = pSerialNumber->pbData; if (pSignatureAlgorithm)