Commit d3cfe743 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: When formatting a directory name as a multiline string, put a newline…

crypt32: When formatting a directory name as a multiline string, put a newline between the heading and the value.
parent 4c3474c0
......@@ -181,7 +181,7 @@ STRINGTABLE DISCARDABLE
IDS_ALT_NAME_OTHER_NAME "Other Name="
IDS_ALT_NAME_RFC822_NAME "Email Address="
IDS_ALT_NAME_DNS_NAME "DNS Name="
IDS_ALT_NAME_DIRECTORY_NAME "Directory Name="
IDS_ALT_NAME_DIRECTORY_NAME "Directory Address"
IDS_ALT_NAME_URL "URL="
IDS_ALT_NAME_IP_ADDRESS "IP Address="
IDS_ALT_NAME_MASK "Mask="
......
......@@ -751,6 +751,7 @@ static BOOL CRYPT_FormatCertSerialNumber(CRYPT_DATA_BLOB *serialNum, LPWSTR str,
}
static const WCHAR indent[] = { ' ',' ',' ',' ',' ',0 };
static const WCHAR colonCrlf[] = { ':','\r','\n',0 };
static BOOL CRYPT_FormatAltNameEntry(DWORD dwFormatStrType, DWORD indentLevel,
CERT_ALT_NAME_ENTRY *entry, LPWSTR str, DWORD *pcbStr)
......@@ -790,6 +791,10 @@ static BOOL CRYPT_FormatAltNameEntry(DWORD dwFormatStrType, DWORD indentLevel,
LoadStringW(hInstance, IDS_ALT_NAME_DIRECTORY_NAME, buf,
sizeof(buf) / sizeof(buf[0]));
bytesNeeded += (directoryNameLen - 1) * sizeof(WCHAR);
if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE)
bytesNeeded += strlenW(colonCrlf) * sizeof(WCHAR);
else
bytesNeeded += sizeof(WCHAR); /* '=' */
ret = TRUE;
break;
}
......@@ -893,6 +898,13 @@ static BOOL CRYPT_FormatAltNameEntry(DWORD dwFormatStrType, DWORD indentLevel,
strcpyW(str, entry->u.pwszURL);
break;
case CERT_ALT_NAME_DIRECTORY_NAME:
if (dwFormatStrType & CRYPT_FORMAT_STR_MULTI_LINE)
{
strcpyW(str, colonCrlf);
str += strlenW(colonCrlf);
}
else
*str++ = '=';
cert_name_to_str_with_indent(X509_ASN_ENCODING,
indentLevel + 1, &entry->u.DirectoryName, strType, str,
bytesNeeded / sizeof(WCHAR));
......@@ -988,7 +1000,6 @@ static BOOL CRYPT_FormatAltNameInfo(DWORD dwFormatStrType, DWORD indentLevel,
return ret;
}
static const WCHAR colonCrlf[] = { ':','\r','\n',0 };
static const WCHAR colonSep[] = { ':',' ',0 };
static BOOL CRYPT_FormatCertIssuer(DWORD dwFormatStrType,
......
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