crypt32: Correct heading for a certificate issuer in a CERT_AUTHORITY_KEY_ID2.
This commit is contained in:
parent
6555ea262c
commit
e987ecc3e7
|
@ -176,7 +176,7 @@ STRINGTABLE DISCARDABLE
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
IDS_KEY_ID "KeyID="
|
IDS_KEY_ID "KeyID="
|
||||||
IDS_CERT_ISSUER "Certificate Issuer: "
|
IDS_CERT_ISSUER "Certificate Issuer"
|
||||||
IDS_CERT_SERIAL_NUMBER "Certificate Serial Number="
|
IDS_CERT_SERIAL_NUMBER "Certificate Serial Number="
|
||||||
IDS_ALT_NAME_OTHER_NAME "Other Name="
|
IDS_ALT_NAME_OTHER_NAME "Other Name="
|
||||||
IDS_ALT_NAME_RFC822_NAME "Email Address="
|
IDS_ALT_NAME_RFC822_NAME "Email Address="
|
||||||
|
|
|
@ -990,17 +990,32 @@ static BOOL CRYPT_FormatAltNameInfo(DWORD dwFormatStrType, DWORD indentLevel,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const WCHAR colonCrlf[] = { ':','\r','\n',0 };
|
||||||
|
static const WCHAR colonSep[] = { ':',' ',0 };
|
||||||
|
|
||||||
static BOOL CRYPT_FormatCertIssuer(DWORD dwFormatStrType,
|
static BOOL CRYPT_FormatCertIssuer(DWORD dwFormatStrType,
|
||||||
CERT_ALT_NAME_INFO *issuer, LPWSTR str, DWORD *pcbStr)
|
CERT_ALT_NAME_INFO *issuer, LPWSTR str, DWORD *pcbStr)
|
||||||
{
|
{
|
||||||
WCHAR buf[MAX_STRING_RESOURCE_LEN];
|
WCHAR buf[MAX_STRING_RESOURCE_LEN];
|
||||||
DWORD bytesNeeded;
|
DWORD bytesNeeded, sepLen;
|
||||||
|
LPCWSTR sep;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
||||||
LoadStringW(hInstance, IDS_CERT_ISSUER, buf, sizeof(buf) / sizeof(buf[0]));
|
LoadStringW(hInstance, IDS_CERT_ISSUER, buf, sizeof(buf) / sizeof(buf[0]));
|
||||||
ret = CRYPT_FormatAltNameInfo(dwFormatStrType, 0, issuer, NULL,
|
ret = CRYPT_FormatAltNameInfo(dwFormatStrType, 1, issuer, NULL,
|
||||||
&bytesNeeded);
|
&bytesNeeded);
|
||||||
bytesNeeded += strlenW(buf) * sizeof(WCHAR);
|
bytesNeeded += strlenW(buf) * sizeof(WCHAR);
|
||||||
|
if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE)
|
||||||
|
{
|
||||||
|
sep = colonCrlf;
|
||||||
|
sepLen = strlenW(colonCrlf) * sizeof(WCHAR);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sep = colonSep;
|
||||||
|
sepLen = strlenW(colonSep) * sizeof(WCHAR);
|
||||||
|
}
|
||||||
|
bytesNeeded += sepLen;
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
if (!str)
|
if (!str)
|
||||||
|
@ -1015,9 +1030,11 @@ static BOOL CRYPT_FormatCertIssuer(DWORD dwFormatStrType,
|
||||||
{
|
{
|
||||||
*pcbStr = bytesNeeded;
|
*pcbStr = bytesNeeded;
|
||||||
strcpyW(str, buf);
|
strcpyW(str, buf);
|
||||||
str += strlenW(str);
|
|
||||||
bytesNeeded -= strlenW(str) * sizeof(WCHAR);
|
bytesNeeded -= strlenW(str) * sizeof(WCHAR);
|
||||||
ret = CRYPT_FormatAltNameInfo(dwFormatStrType, 0, issuer, str,
|
str += strlenW(str);
|
||||||
|
strcpyW(str, sep);
|
||||||
|
str += sepLen / sizeof(WCHAR);
|
||||||
|
ret = CRYPT_FormatAltNameInfo(dwFormatStrType, 1, issuer, str,
|
||||||
&bytesNeeded);
|
&bytesNeeded);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1157,16 +1174,14 @@ static BOOL WINAPI CRYPT_FormatAuthorityKeyId2(DWORD dwCertEncodingType,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const WCHAR colonCrlf[] = { ':','\r','\n',0 };
|
|
||||||
|
|
||||||
static WCHAR aia[MAX_STRING_RESOURCE_LEN];
|
static WCHAR aia[MAX_STRING_RESOURCE_LEN];
|
||||||
static WCHAR accessMethod[MAX_STRING_RESOURCE_LEN];
|
static WCHAR accessMethod[MAX_STRING_RESOURCE_LEN];
|
||||||
static WCHAR ocsp[MAX_STRING_RESOURCE_LEN];
|
static WCHAR ocsp[MAX_STRING_RESOURCE_LEN];
|
||||||
static WCHAR caIssuers[MAX_STRING_RESOURCE_LEN];
|
static WCHAR caIssuers[MAX_STRING_RESOURCE_LEN];
|
||||||
static WCHAR unknown[MAX_STRING_RESOURCE_LEN];
|
static WCHAR unknown[MAX_STRING_RESOURCE_LEN];
|
||||||
static WCHAR accessLocation[MAX_STRING_RESOURCE_LEN];
|
static WCHAR accessLocation[MAX_STRING_RESOURCE_LEN];
|
||||||
static BOOL WINAPI CRYPT_FormatAuthorityInfoAccess(DWORD dwCertEncodingType,
|
|
||||||
|
|
||||||
|
static BOOL WINAPI CRYPT_FormatAuthorityInfoAccess(DWORD dwCertEncodingType,
|
||||||
DWORD dwFormatType, DWORD dwFormatStrType, void *pFormatStruct,
|
DWORD dwFormatType, DWORD dwFormatStrType, void *pFormatStruct,
|
||||||
LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, void *pbFormat,
|
LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, void *pbFormat,
|
||||||
DWORD *pcbFormat)
|
DWORD *pcbFormat)
|
||||||
|
@ -1209,7 +1224,6 @@ static BOOL WINAPI CRYPT_FormatAuthorityInfoAccess(DWORD dwCertEncodingType,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static const WCHAR colonSep[] = { ':',' ',0 };
|
|
||||||
static const WCHAR numFmt[] = { '%','d',0 };
|
static const WCHAR numFmt[] = { '%','d',0 };
|
||||||
static const WCHAR equal[] = { '=',0 };
|
static const WCHAR equal[] = { '=',0 };
|
||||||
static BOOL stringsLoaded = FALSE;
|
static BOOL stringsLoaded = FALSE;
|
||||||
|
@ -1492,7 +1506,6 @@ static BOOL WINAPI CRYPT_FormatCRLDistPoints(DWORD dwCertEncodingType,
|
||||||
pbEncoded, cbEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size)))
|
pbEncoded, cbEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, &info, &size)))
|
||||||
{
|
{
|
||||||
static const WCHAR numFmt[] = { '%','d',0 };
|
static const WCHAR numFmt[] = { '%','d',0 };
|
||||||
static const WCHAR colonSep[] = { ':',' ',0 };
|
|
||||||
static const WCHAR commaSep[] = { ',',' ',0 };
|
static const WCHAR commaSep[] = { ',',' ',0 };
|
||||||
static const WCHAR colon[] = { ':',0 };
|
static const WCHAR colon[] = { ':',0 };
|
||||||
static BOOL stringsLoaded = FALSE;
|
static BOOL stringsLoaded = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue