Module: wine Branch: master Commit: ba1b572da28e5bb0059446043f474960d510ea90 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ba1b572da28e5bb0059446043f...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Wed Dec 11 17:16:15 2013 +0900
crypt32: Add support for decoding serial number property in the certificate attributes.
---
dlls/crypt32/oid.c | 2 ++ dlls/crypt32/str.c | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index 4c3f95f..d5c2953 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.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 Email[] = { 'E','m','a','i','l',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 mosaicFlags = CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG | @@ -1226,6 +1227,7 @@ static const struct OIDInfoConstructor { { 5, szOID_TELEPHONE_NUMBER, 0, Phone, &printableStringBlob }, { 5, szOID_X21_ADDRESS, 0, X21Address, &numericStringBlob }, { 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_IDENTIFIER, 0, (LPCWSTR)IDS_AUTHORITY_KEY_ID, NULL }, diff --git a/dlls/crypt32/str.c b/dlls/crypt32/str.c index 6d406d2..cf29c6f 100644 --- a/dlls/crypt32/str.c +++ b/dlls/crypt32/str.c @@ -457,7 +457,7 @@ DWORD WINAPI CertNameToStrA(DWORD dwCertEncodingType, PCERT_NAME_BLOB pName, for (j = 0; (!psz || ret < csz) && j < rdn->cRDNAttr; j++) { DWORD chars; - char prefixBuf[10]; /* big enough for GivenName */ + char prefixBuf[13]; /* big enough for SERIALNUMBER */ LPCSTR prefix = NULL;
if ((dwStrType & 0x000000ff) == CERT_OID_NAME_STR)