Author: akhaldi Date: Sat Sep 27 10:36:45 2014 New Revision: 64329
URL: http://svn.reactos.org/svn/reactos?rev=64329&view=rev Log: [CRYPT32] * Sync with Wine 1.7.27. CORE-8540
Modified: trunk/reactos/dll/win32/crypt32/cert.c trunk/reactos/dll/win32/crypt32/chain.c trunk/reactos/dll/win32/crypt32/crypt32_private.h trunk/reactos/dll/win32/crypt32/sip.c trunk/reactos/dll/win32/crypt32/str.c trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/crypt32/cert.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/cert.c?re... ============================================================================== --- trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] Sat Sep 27 10:36:45 2014 @@ -1873,6 +1873,12 @@ { CertFreeCertificateContext(ret); ret = NULL; + } + if (CRYPT_IsCertificateSelfSigned(pSubjectContext)) + { + CertFreeCertificateContext(ret); + ret = NULL; + SetLastError(CRYPT_E_SELF_SIGNED); } } TRACE("returning %p\n", ret);
Modified: trunk/reactos/dll/win32/crypt32/chain.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/chain.c?r... ============================================================================== --- trunk/reactos/dll/win32/crypt32/chain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/chain.c [iso-8859-1] Sat Sep 27 10:36:45 2014 @@ -258,7 +258,7 @@ LONG ref; } CertificateChain;
-static BOOL CRYPT_IsCertificateSelfSigned(PCCERT_CONTEXT cert) +BOOL CRYPT_IsCertificateSelfSigned(PCCERT_CONTEXT cert) { PCERT_EXTENSION ext; DWORD size;
Modified: trunk/reactos/dll/win32/crypt32/crypt32_private.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/crypt32_p... ============================================================================== --- trunk/reactos/dll/win32/crypt32/crypt32_private.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/crypt32_private.h [iso-8859-1] Sat Sep 27 10:36:45 2014 @@ -366,6 +366,7 @@ WINECRYPT_CERTSTORE *CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN; WINECRYPT_CERTSTORE *CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags) DECLSPEC_HIDDEN; +BOOL CRYPT_IsCertificateSelfSigned(PCCERT_CONTEXT cert) DECLSPEC_HIDDEN;
/* Allocates and initializes a certificate chain engine, but without creating * the root store. Instead, it uses root, and assumes the caller has done any
Modified: trunk/reactos/dll/win32/crypt32/sip.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/sip.c?rev... ============================================================================== --- trunk/reactos/dll/win32/crypt32/sip.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/sip.c [iso-8859-1] Sat Sep 27 10:36:45 2014 @@ -198,7 +198,7 @@ TRACE("%p\n", psNewProv);
if (!psNewProv || - psNewProv->cbStruct != sizeof(SIP_ADD_NEWPROVIDER) || + psNewProv->cbStruct < FIELD_OFFSET(SIP_ADD_NEWPROVIDER, pwszGetCapFuncName) || !psNewProv->pwszGetFuncName || !psNewProv->pwszPutFuncName || !psNewProv->pwszCreateFuncName ||
Modified: trunk/reactos/dll/win32/crypt32/str.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/str.c?rev... ============================================================================== --- trunk/reactos/dll/win32/crypt32/str.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/crypt32/str.c [iso-8859-1] Sat Sep 27 10:36:45 2014 @@ -831,13 +831,14 @@
/* Assumes separators are characters in the 0-255 range */ static BOOL CRYPT_GetNextValueW(LPCWSTR str, DWORD dwFlags, LPCWSTR separators, - struct X500TokenW *token, LPCWSTR *ppszError) + WCHAR *separator_used, struct X500TokenW *token, LPCWSTR *ppszError) { BOOL ret = TRUE;
TRACE("(%s, %s, %p, %p)\n", debugstr_w(str), debugstr_w(separators), token, ppszError);
+ *separator_used = 0; while (*str && isspaceW(*str)) str++; if (*str) @@ -877,6 +878,7 @@ while (*str && (*str >= 0xff || !map[*str])) str++; token->end = str; + if (map[*str]) *separator_used = *str; } } else @@ -1068,6 +1070,7 @@ static const WCHAR allSepsWithoutPlus[] = { ',',';','\r','\n',0 }; static const WCHAR allSeps[] = { '+',',',';','\r','\n',0 }; LPCWSTR sep; + WCHAR sep_used;
str++; if (dwStrType & CERT_NAME_STR_COMMA_FLAG) @@ -1080,11 +1083,14 @@ sep = allSepsWithoutPlus; else sep = allSeps; - ret = CRYPT_GetNextValueW(str, dwStrType, sep, &token, + ret = CRYPT_GetNextValueW(str, dwStrType, sep, &sep_used, &token, ppszError); if (ret) { str = token.end; + /* if token.end points to the separator, skip it */ + if (str && sep_used && *str == sep_used) str++; + ret = CRYPT_ValueToRDN(dwCertEncodingType, &info, keyOID, &token, dwStrType, ppszError); }
Modified: trunk/reactos/media/doc/README.WINE URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=6... ============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Sep 27 10:36:45 2014 @@ -64,7 +64,7 @@ reactos/dll/win32/comdlg32 # Synced to Wine-1.7.27 reactos/dll/win32/compstui # Synced to Wine-1.7.17 reactos/dll/win32/credui # Synced to Wine-1.7.17 -reactos/dll/win32/crypt32 # Synced to Wine-1.7.17 +reactos/dll/win32/crypt32 # Synced to Wine-1.7.27 reactos/dll/win32/cryptdlg # Synced to Wine-1.7.17 reactos/dll/win32/cryptdll # Synced to Wine-1.7.17 reactos/dll/win32/cryptnet # Synced to Wine-1.7.17