Commit ba1b572d authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

crypt32: Add support for decoding serial number property in the certificate attributes.

parent d5863f7f
...@@ -1107,6 +1107,7 @@ static const WCHAR SpcFinancialCriteria[] = { 'S','p','c','F','i','n','a','n','c ...@@ -1107,6 +1107,7 @@ static const WCHAR SpcFinancialCriteria[] = { 'S','p','c','F','i','n','a','n','c
static const WCHAR SpcMinimalCriteria[] = { 'S','p','c','M','i','n','i','m','a','l','C','r','i','t','e','r','i','a',0 }; static const WCHAR SpcMinimalCriteria[] = { 'S','p','c','M','i','n','i','m','a','l','C','r','i','t','e','r','i','a',0 };
static const WCHAR Email[] = { 'E','m','a','i','l',0 }; static const WCHAR Email[] = { 'E','m','a','i','l',0 };
static const WCHAR GN[] = { 'G','N',0 }; static const WCHAR GN[] = { 'G','N',0 };
static const WCHAR SERIALNUMBER[] = { 'S','E','R','I','A','L','N','U','M','B','E','R',0 };
static const DWORD noNullFlag = CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG; static const DWORD noNullFlag = CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG;
static const DWORD mosaicFlags = CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG | static const DWORD mosaicFlags = CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG |
...@@ -1226,6 +1227,7 @@ static const struct OIDInfoConstructor { ...@@ -1226,6 +1227,7 @@ static const struct OIDInfoConstructor {
{ 5, szOID_TELEPHONE_NUMBER, 0, Phone, &printableStringBlob }, { 5, szOID_TELEPHONE_NUMBER, 0, Phone, &printableStringBlob },
{ 5, szOID_X21_ADDRESS, 0, X21Address, &numericStringBlob }, { 5, szOID_X21_ADDRESS, 0, X21Address, &numericStringBlob },
{ 5, szOID_DN_QUALIFIER, 0, dnQualifier, NULL }, { 5, szOID_DN_QUALIFIER, 0, dnQualifier, NULL },
{ 5, szOID_DEVICE_SERIAL_NUMBER, 0, SERIALNUMBER, NULL },
{ 6, szOID_AUTHORITY_KEY_IDENTIFIER2, 0, (LPCWSTR)IDS_AUTHORITY_KEY_ID, NULL }, { 6, szOID_AUTHORITY_KEY_IDENTIFIER2, 0, (LPCWSTR)IDS_AUTHORITY_KEY_ID, NULL },
{ 6, szOID_AUTHORITY_KEY_IDENTIFIER, 0, (LPCWSTR)IDS_AUTHORITY_KEY_ID, NULL }, { 6, szOID_AUTHORITY_KEY_IDENTIFIER, 0, (LPCWSTR)IDS_AUTHORITY_KEY_ID, NULL },
......
...@@ -457,7 +457,7 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, ...@@ -457,7 +457,7 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName,
for (j = 0; (!psz || ret < csz) && j < rdn->cRDNAttr; j++) for (j = 0; (!psz || ret < csz) && j < rdn->cRDNAttr; j++)
{ {
DWORD chars; DWORD chars;
char prefixBuf[10]; /* big enough for GivenName */ char prefixBuf[13]; /* big enough for SERIALNUMBER */
LPCSTR prefix = NULL; LPCSTR prefix = NULL;
if ((dwStrType & 0x000000ff) == CERT_OID_NAME_STR) if ((dwStrType & 0x000000ff) == CERT_OID_NAME_STR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment