crypt32: Create a V1 certificate if it doesn't have extensions.

This commit is contained in:
Juan Lang 2009-10-28 10:48:02 -07:00 committed by Alexandre Julliard
parent 710219a53d
commit c4ce06293c
1 changed files with 4 additions and 1 deletions

View File

@ -2807,7 +2807,10 @@ static void CRYPT_MakeCertInfo(PCERT_INFO info, const CRYPT_DATA_BLOB *pSerialNu
assert(pSubjectIssuerBlob); assert(pSubjectIssuerBlob);
assert(pubKey); assert(pubKey);
if (pExtensions && pExtensions->cExtension)
info->dwVersion = CERT_V3; info->dwVersion = CERT_V3;
else
info->dwVersion = CERT_V1;
info->SerialNumber.cbData = pSerialNumber->cbData; info->SerialNumber.cbData = pSerialNumber->cbData;
info->SerialNumber.pbData = pSerialNumber->pbData; info->SerialNumber.pbData = pSerialNumber->pbData;
if (pSignatureAlgorithm) if (pSignatureAlgorithm)