[PATCH 0/1] MR10878: crypt32: Use case-incensitive comparison for registered OID names.
From: Dmitry Timoshkov <dmitry@baikal.ru> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=59746 Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> --- dlls/crypt32/oid.c | 2 +- dlls/crypt32/tests/str.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index 9aa4a3e840a..a35917ff8f0 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -1752,7 +1752,7 @@ PCCRYPT_OID_INFO WINAPI CryptFindOIDInfo(DWORD dwKeyType, void *pvKey, EnterCriticalSection(&oidInfoCS); LIST_FOR_EACH_ENTRY(info, &oidInfo, struct OIDInfo, entry) { - if (!wcscmp(info->info.pwszName, pvKey) && + if (!wcsicmp(info->info.pwszName, pvKey) && (!dwGroupId || info->info.dwGroupId == dwGroupId)) { ret = &info->info; diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c index 1f65234f400..28a0c1bfa35 100644 --- a/dlls/crypt32/tests/str.c +++ b/dlls/crypt32/tests/str.c @@ -761,6 +761,7 @@ struct StrToNameA static const struct StrToNameA namesA[] = { { "CN=1", sizeof(encodedSimpleCN), encodedSimpleCN }, + { "cn=1", sizeof(encodedSimpleCN), encodedSimpleCN }, { "CN=\"1\"", sizeof(encodedSimpleCN), encodedSimpleCN }, { "CN = \"1\"", sizeof(encodedSimpleCN), encodedSimpleCN }, { "CN='1'", sizeof(encodedSingleQuotedCN), encodedSingleQuotedCN }, @@ -863,6 +864,7 @@ static const BYTE encodedJapaneseCN[] = { 0x30,0x0f,0x31,0x0d,0x30,0x0b,0x06, static const struct StrToNameW namesW[] = { { L"CN=1", sizeof(encodedSimpleCN), encodedSimpleCN }, + { L"cn=1", sizeof(encodedSimpleCN), encodedSimpleCN }, { L"CN=\"1\"", sizeof(encodedSimpleCN), encodedSimpleCN }, { L"CN = \"1\"", sizeof(encodedSimpleCN), encodedSimpleCN }, { L"CN='1'", sizeof(encodedSingleQuotedCN), encodedSingleQuotedCN }, -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10878
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10878
participants (3)
-
Dmitry Timoshkov -
Dmitry Timoshkov (@dmitry) -
Hans Leidekker (@hans)