Author: akhaldi
Date: Wed Apr 3 22:43:22 2013
New Revision: 58668
URL:
http://svn.reactos.org/svn/reactos?rev=58668&view=rev
Log:
[CRYPT32]
* Sync with Wine 1.5.26.
Modified:
trunk/reactos/dll/win32/crypt32/CMakeLists.txt
trunk/reactos/dll/win32/crypt32/base64.c
trunk/reactos/dll/win32/crypt32/cert.c
trunk/reactos/dll/win32/crypt32/chain.c
trunk/reactos/dll/win32/crypt32/decode.c
trunk/reactos/dll/win32/crypt32/message.c
trunk/reactos/dll/win32/crypt32/msg.c
trunk/reactos/dll/win32/crypt32/object.c
trunk/reactos/dll/win32/crypt32/oid.c
trunk/reactos/dll/win32/crypt32/rootstore.c
trunk/reactos/dll/win32/crypt32/serialize.c
trunk/reactos/dll/win32/crypt32/sip.c
trunk/reactos/dll/win32/crypt32/store.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/crypt32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/CMakeLis…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/CMakeLists.txt [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -1,7 +1,8 @@
add_definitions(
-D__WINESRC__
- -D_WINE)
+ -D_WINE
+ -D_CRYPT32_)
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
Modified: trunk/reactos/dll/win32/crypt32/base64.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/base64.c…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/base64.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/base64.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -828,7 +828,7 @@
ret = decoder(pszString, cchString, pbBinary, pcbBinary, pdwSkip, pdwFlags);
if (ret)
SetLastError(ret);
- return (ret == ERROR_SUCCESS) ? TRUE : FALSE;
+ return ret == ERROR_SUCCESS;
}
static LONG decodeBase64BlockW(const WCHAR *in_buf, int in_len,
@@ -1160,5 +1160,5 @@
ret = decoder(pszString, cchString, pbBinary, pcbBinary, pdwSkip, pdwFlags);
if (ret)
SetLastError(ret);
- return (ret == ERROR_SUCCESS) ? TRUE : FALSE;
-}
+ return ret == ERROR_SUCCESS;
+}
Modified: trunk/reactos/dll/win32/crypt32/cert.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/cert.c?r…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/cert.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -846,7 +846,7 @@
* keyProvInfo->pwszContainerName to be NULL or a heap-allocated container
* name.
*/
- memcpy(©, keyProvInfo, sizeof(copy));
+ copy = *keyProvInfo;
copy.pwszContainerName = containerW;
matches = key_prov_info_matches_cert(pCert, ©);
if (matches)
@@ -2220,9 +2220,7 @@
info.ToBeSigned.cbData = encodedSize;
info.ToBeSigned.pbData = encoded;
- memcpy(&info.SignatureAlgorithm,
- pSignatureAlgorithm,
- sizeof(info.SignatureAlgorithm));
+ info.SignatureAlgorithm = *pSignatureAlgorithm;
info.Signature.cbData = hashSize;
info.Signature.pbData = hash;
info.Signature.cUnusedBits = 0;
@@ -2243,8 +2241,10 @@
DWORD dwCertEncodingType, const BYTE *pbEncoded, DWORD cbEncoded,
PCERT_PUBLIC_KEY_INFO pPublicKey)
{
+ CRYPT_DATA_BLOB blob = { cbEncoded, (BYTE *)pbEncoded };
+
return CryptVerifyCertificateSignatureEx(hCryptProv, dwCertEncodingType,
- CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, (void *)pbEncoded,
+ CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB, &blob,
CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY, pPublicKey, 0, NULL);
}
@@ -2988,8 +2988,7 @@
signedInfo.ToBeSigned.cbData = blob->cbData;
signedInfo.ToBeSigned.pbData = blob->pbData;
- memcpy(&signedInfo.SignatureAlgorithm, sigAlgo,
- sizeof(signedInfo.SignatureAlgorithm));
+ signedInfo.SignatureAlgorithm = *sigAlgo;
signedInfo.Signature.cbData = sigSize;
signedInfo.Signature.pbData = sig;
signedInfo.Signature.cUnusedBits = 0;
@@ -3040,8 +3039,7 @@
info->SerialNumber.cbData = pSerialNumber->cbData;
info->SerialNumber.pbData = pSerialNumber->pbData;
if (pSignatureAlgorithm)
- memcpy(&info->SignatureAlgorithm, pSignatureAlgorithm,
- sizeof(info->SignatureAlgorithm));
+ info->SignatureAlgorithm = *pSignatureAlgorithm;
else
{
info->SignatureAlgorithm.pszObjId = oid;
@@ -3068,8 +3066,7 @@
}
info->Subject.cbData = pSubjectIssuerBlob->cbData;
info->Subject.pbData = pSubjectIssuerBlob->pbData;
- memcpy(&info->SubjectPublicKeyInfo, pubKey,
- sizeof(info->SubjectPublicKeyInfo));
+ info->SubjectPublicKeyInfo = *pubKey;
if (pExtensions)
{
info->cExtension = pExtensions->cExtension;
@@ -3141,7 +3138,7 @@
PCCERT_CONTEXT context = NULL;
BOOL ret, releaseContext = FALSE;
PCERT_PUBLIC_KEY_INFO pubKey = NULL;
- DWORD pubKeySize = 0,dwKeySpec = AT_SIGNATURE;
+ DWORD pubKeySize = 0, dwKeySpec;
TRACE("(%08lx, %p, %08x, %p, %p, %p, %p, %p)\n", hProv,
pSubjectIssuerBlob, dwFlags, pKeyProvInfo, pSignatureAlgorithm, pStartTime,
@@ -3153,6 +3150,7 @@
return NULL;
}
+ dwKeySpec = pKeyProvInfo ? pKeyProvInfo->dwKeySpec : AT_SIGNATURE;
if (!hProv)
{
if (!pKeyProvInfo)
@@ -3183,7 +3181,6 @@
if (!ret)
return NULL;
}
- dwKeySpec = pKeyProvInfo->dwKeySpec;
/* check if the key is here */
ret = CryptGetUserKey(hProv,dwKeySpec,&hKey);
if(!ret)
@@ -3203,14 +3200,11 @@
releaseContext = TRUE;
}
}
- else if (pKeyProvInfo)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return NULL;
- }
-
- CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL,
+
+ ret = CryptExportPublicKeyInfo(hProv, dwKeySpec, X509_ASN_ENCODING, NULL,
&pubKeySize);
+ if (!ret)
+ goto end;
pubKey = CryptMemAlloc(pubKeySize);
if (pubKey)
{
@@ -3244,6 +3238,7 @@
}
CryptMemFree(pubKey);
}
+end:
if (releaseContext)
CryptReleaseContext(hProv, 0);
return context;
Modified: trunk/reactos/dll/win32/crypt32/chain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/chain.c?…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/chain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/chain.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -3162,6 +3162,7 @@
BOOL matches = TRUE;
*see_wildcard = FALSE;
+
if (server_len < allowed_len)
{
WARN_(chain)("domain component %s too short for %s\n",
@@ -3220,6 +3221,13 @@
BOOL matches = TRUE, allow_wildcards = TRUE;
TRACE_(chain)("CN = %s\n", debugstr_wn(allowed_component, allowed_len));
+
+ /* Remove trailing NULLs from the allowed name; while they shouldn't appear
+ * in a certificate in the first place, they sometimes do, and they should
+ * be ignored.
+ */
+ while (allowed_len && allowed_component[allowed_len - 1] == 0)
+ allowed_len--;
/* From RFC 2818 (HTTP over TLS), section 3.1:
* "Names may contain the wildcard character * which is considered to match
Modified: trunk/reactos/dll/win32/crypt32/decode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/decode.c…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/decode.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -692,8 +692,7 @@
CryptMemAlloc(
cItems * sizeof(struct AsnArrayItemSize));
if (itemSizes)
- memcpy(itemSizes, &itemSize,
- sizeof(itemSize));
+ *itemSizes = itemSize;
}
if (itemSizes)
{
@@ -1310,22 +1309,17 @@
if (dataLen)
{
- /* The largest possible string for the first two components
- * is 2.175 (= 2 * 40 + 175 = 255), so this is big enough.
- */
- char firstTwo[6];
const BYTE *ptr;
-
- snprintf(firstTwo, sizeof(firstTwo), "%d.%d",
+ char str[32];
+
+ snprintf(str, sizeof(str), "%d.%d",
pbEncoded[1 + lenBytes] / 40,
pbEncoded[1 + lenBytes] - (pbEncoded[1 + lenBytes] / 40)
* 40);
- bytesNeeded += strlen(firstTwo) + 1;
+ bytesNeeded += strlen(str) + 1;
for (ptr = pbEncoded + 2 + lenBytes; ret &&
ptr - pbEncoded - 1 - lenBytes < dataLen; )
{
- /* large enough for ".4000000" */
- char str[9];
int val = 0;
while (ptr - pbEncoded - 1 - lenBytes < dataLen &&
@@ -1917,7 +1911,7 @@
sizeof(CERT_NAME_INFO),
CRYPT_AsnDecodeRdn, sizeof(CERT_RDN), TRUE,
offsetof(CERT_RDN, rgRDNAttr) };
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded,
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, NULL, &bytesNeeded,
@@ -2014,7 +2008,7 @@
sizeof(CERT_NAME_INFO),
CRYPT_AsnDecodeUnicodeRdn, sizeof(CERT_RDN), TRUE,
offsetof(CERT_RDN, rgRDNAttr) };
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
ret = CRYPT_AsnDecodeArray(&arrayDesc, pbEncoded, cbEncoded,
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, NULL, &bytesNeeded,
@@ -2460,7 +2454,7 @@
FALSE, TRUE, offsetof(CERT_POLICY_QUALIFIER_NOTICE_REFERENCE,
rgNoticeNumbers), 0 },
};
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
TRACE("%p, %d, %08x, %p, %d\n", pbEncoded, cbEncoded, dwFlags,
pvStructInfo, pvStructInfo ? *pcbStructInfo : 0);
@@ -2677,7 +2671,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
ret = CRYPT_AsnDecodePolicyQualifierUserNoticeInternal(pbEncoded,
cbEncoded, dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded,
@@ -2771,7 +2765,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
ret = CRYPT_AsnDecodePKCSAttributeInternal(pbEncoded, cbEncoded,
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL);
@@ -2912,7 +2906,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
if ((ret = CRYPT_AsnDecodePubKeyInfoInternal(pbEncoded, cbEncoded,
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL)))
@@ -2982,7 +2976,7 @@
else
{
*pcbStructInfo = sizeof(BOOL);
- *(BOOL *)pvStructInfo = pbEncoded[2] ? TRUE : FALSE;
+ *(BOOL *)pvStructInfo = pbEncoded[2] != 0;
ret = TRUE;
}
TRACE("returning %d (%08x)\n", ret, GetLastError());
@@ -3414,7 +3408,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
if ((ret = CRYPT_AsnDecodeAltNameInternal(pbEncoded, cbEncoded,
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL)))
@@ -4002,7 +3996,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
if (!cbEncoded)
{
@@ -4111,7 +4105,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
if (!cbEncoded)
{
@@ -4205,7 +4199,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
if (!cbEncoded)
{
@@ -4298,7 +4292,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
if (pbEncoded[0] != ASN_INTEGER)
{
@@ -4406,7 +4400,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
if ((ret = CRYPT_AsnDecodeUnsignedIntegerInternal(pbEncoded, cbEncoded,
dwFlags & ~CRYPT_ENCODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL)))
@@ -4662,7 +4656,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
ret = CRYPT_AsnDecodeUtcTimeInternal(pbEncoded, cbEncoded,
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL);
@@ -4793,7 +4787,7 @@
__TRY
{
- DWORD bytesNeeded;
+ DWORD bytesNeeded = 0;
ret = CRYPT_AsnDecodeChoiceOfTimeInternal(pbEncoded, cbEncoded,
dwFlags & ~CRYPT_DECODE_ALLOC_FLAG, NULL, &bytesNeeded, NULL);
@@ -4938,7 +4932,7 @@
if (pbEncoded[0] == (ASN_CONTEXT | ASN_CONSTRUCTOR | 0))
{
- DWORD bytesNeeded, dataLen;
+ DWORD bytesNeeded = 0, dataLen;
if ((ret = CRYPT_GetLen(pbEncoded, cbEncoded, &dataLen)))
{
Modified: trunk/reactos/dll/win32/crypt32/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/message.…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/message.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/message.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -140,7 +140,7 @@
for (i = 0; ret && i < cToBeSigned; i++)
ret = CryptMsgUpdate(msg, rgpbToBeSigned[i], rgcbToBeSigned[i],
- i == cToBeSigned - 1 ? TRUE : FALSE);
+ i == cToBeSigned - 1);
}
if (ret)
{
@@ -210,6 +210,9 @@
if (msg)
{
ret = CryptMsgUpdate(msg, pbSignedBlob, cbSignedBlob, TRUE);
+ if (ret && pcbDecoded)
+ ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, pbDecoded,
+ pcbDecoded);
if (ret)
{
CERT_INFO *certInfo = CRYPT_GetSignerCertInfoFromMsg(msg,
@@ -241,20 +244,6 @@
}
CryptMemFree(certInfo);
}
- if (ret)
- {
- /* The caller is expected to pass a valid pointer to pcbDecoded
- * when the message verifies successfully.
- */
- if (pcbDecoded)
- ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, pbDecoded,
- pcbDecoded);
- else
- {
- SetLastError(CRYPT_E_NOT_FOUND);
- ret = FALSE;
- }
- }
CryptMsgClose(msg);
}
if(!ret && pcbDecoded)
@@ -296,16 +285,14 @@
memset(&info, 0, sizeof(info));
info.cbSize = sizeof(info);
info.hCryptProv = pHashPara->hCryptProv;
- memcpy(&info.HashAlgorithm, &pHashPara->HashAlgorithm,
- sizeof(info.HashAlgorithm));
+ info.HashAlgorithm = pHashPara->HashAlgorithm;
info.pvHashAuxInfo = pHashPara->pvHashAuxInfo;
msg = CryptMsgOpenToEncode(pHashPara->dwMsgEncodingType, flags, CMSG_HASHED,
&info, NULL, NULL);
if (msg)
{
for (i = 0, ret = TRUE; ret && i < cToBeHashed; i++)
- ret = CryptMsgUpdate(msg, rgpbToBeHashed[i], rgcbToBeHashed[i],
- i == cToBeHashed - 1 ? TRUE : FALSE);
+ ret = CryptMsgUpdate(msg, rgpbToBeHashed[i], rgcbToBeHashed[i], i ==
cToBeHashed - 1);
if (ret)
{
ret = CryptMsgGetParam(msg, CMSG_CONTENT_PARAM, 0, pbHashedBlob,
@@ -356,7 +343,7 @@
for (i = 0; ret && i < cToBeHashed; i++)
{
ret = CryptMsgUpdate(msg, rgpbToBeHashed[i],
- rgcbToBeHashed[i], i == cToBeHashed - 1 ? TRUE : FALSE);
+ rgcbToBeHashed[i], i == cToBeHashed - 1);
}
}
else
@@ -511,7 +498,7 @@
for (i = 0; ret && i < cToBeSigned; ++i)
{
ret = CryptMsgUpdate(msg, rgpbToBeSigned[i], rgcbToBeSigned[i],
- i == cToBeSigned - 1 ? TRUE : FALSE);
+ i == cToBeSigned - 1);
}
}
else
Modified: trunk/reactos/dll/win32/crypt32/msg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/msg.c?re…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/msg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/msg.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -1450,6 +1450,7 @@
if (!ret)
{
CSignedEncodeMsg_Close(msg);
+ CryptMemFree(msg);
msg = NULL;
}
}
@@ -2397,16 +2398,16 @@
!strcmp(msg->u.signed_data.info->content.pszObjId,
szOID_RSA_data))
{
- CRYPT_DATA_BLOB *blob;
+ CRYPT_DATA_BLOB *rsa_blob;
ret = CryptDecodeObjectEx(X509_ASN_ENCODING,
X509_OCTET_STRING, content->pbData, content->cbData,
- CRYPT_DECODE_ALLOC_FLAG, NULL, &blob, &size);
+ CRYPT_DECODE_ALLOC_FLAG, NULL, &rsa_blob, &size);
if (ret)
{
ret = CSignedMsgData_Update(&msg->u.signed_data,
- blob->pbData, blob->cbData, TRUE, Verify);
- LocalFree(blob);
+ rsa_blob->pbData, rsa_blob->cbData, TRUE, Verify);
+ LocalFree(rsa_blob);
}
}
else
Modified: trunk/reactos/dll/win32/crypt32/object.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/object.c…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/object.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/object.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -842,7 +842,7 @@
DWORD mapEntries, void *pbFormat, DWORD *pcbFormat, BOOL *first)
{
DWORD bytesNeeded = sizeof(WCHAR);
- int i;
+ unsigned int i;
BOOL ret = TRUE, localFirst = *first;
for (i = 0; i < mapEntries; i++)
@@ -947,7 +947,7 @@
else
{
static BOOL stringsLoaded = FALSE;
- int i;
+ unsigned int i;
DWORD bitStringLen;
BOOL first = TRUE;
@@ -1866,7 +1866,7 @@
static const WCHAR sep[] = { ',',' ',0 };
static const WCHAR bitsFmt[] = { '
','(','%','0','2','x',')',0 };
static BOOL stringsLoaded = FALSE;
- int i, numReasons = 0;
+ unsigned int i, numReasons = 0;
BOOL ret = TRUE;
DWORD bytesNeeded = sizeof(WCHAR);
WCHAR bits[6];
@@ -2317,7 +2317,7 @@
else
{
static BOOL stringsLoaded = FALSE;
- int i;
+ unsigned int i;
DWORD bitStringLen;
BOOL first = TRUE;
Modified: trunk/reactos/dll/win32/crypt32/oid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/oid.c?re…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/oid.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/oid.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -684,7 +684,7 @@
CryptMemFree(szKey);
if (rc)
SetLastError(rc);
- return rc ? FALSE : TRUE;
+ return !rc;
}
BOOL WINAPI CryptGetOIDFunctionValue(DWORD dwEncodingType, LPCSTR pszFuncName,
@@ -721,7 +721,7 @@
SetLastError(rc);
RegCloseKey(hKey);
}
- return rc ? FALSE : TRUE;
+ return !rc;
}
BOOL WINAPI CryptSetOIDFunctionValue(DWORD dwEncodingType, LPCSTR pszFuncName,
@@ -758,7 +758,7 @@
SetLastError(rc);
RegCloseKey(hKey);
}
- return rc ? FALSE : TRUE;
+ return !rc;
}
static LPCWSTR CRYPT_FindStringInMultiString(LPCWSTR multi, LPCWSTR toFind)
@@ -1053,9 +1053,6 @@
static const WCHAR rc4[] = { 'r','c','4',0 };
static const WCHAR sha[] = { 's','h','a',0 };
static const WCHAR sha1[] = { 's','h','a','1',0 };
-static const WCHAR sha256[] = {
's','h','a','2','5','6',0 };
-static const WCHAR sha384[] = {
's','h','a','3','8','4',0 };
-static const WCHAR sha512[] = {
's','h','a','5','1','2',0 };
static const WCHAR RSA[] = { 'R','S','A',0 };
static const WCHAR RSA_KEYX[] = {
'R','S','A','_','K','E','Y','X',0
};
static const WCHAR RSA_SIGN[] = {
'R','S','A','_','S','I','G','N',0
};
@@ -1105,6 +1102,9 @@
static const WCHAR X21Address[] = {
'X','2','1','A','d','d','r','e','s','s',0
};
static const WCHAR dnQualifier[] =
{
'd','n','Q','u','a','l','i','f','i','e','r',0
};
+static const WCHAR SpcSpAgencyInfo[] = {
'S','p','c','S','p','A','g','e','n','c','y','I','n','f','o',0
};
+static const WCHAR SpcFinancialCriteria[] = {
'S','p','c','F','i','n','a','n','c','i','a','l','C','r','i','t','e','r','i','a',0
};
+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 };
@@ -1273,9 +1273,9 @@
{ 6, szOID_NETSCAPE_CA_POLICY_URL, 0, (LPCWSTR)IDS_NETSCAPE_CA_POLICY_URL, NULL },
{ 6, szOID_NETSCAPE_SSL_SERVER_NAME, 0, (LPCWSTR)IDS_NETSCAPE_SSL_SERVER_NAME, NULL },
{ 6, szOID_NETSCAPE_COMMENT, 0, (LPCWSTR)IDS_NETSCAPE_COMMENT, NULL },
- { 6, "1.3.6.1.4.1.311.2.1.10", 0, (LPCWSTR)IDS_SPC_SP_AGENCY_INFO, NULL },
- { 6, "1.3.6.1.4.1.311.2.1.27", 0, (LPCWSTR)IDS_SPC_FINANCIAL_CRITERIA, NULL
},
- { 6, "1.3.6.1.4.1.311.2.1.26", 0, (LPCWSTR)IDS_SPC_MINIMAL_CRITERIA, NULL },
+ { 6, "1.3.6.1.4.1.311.2.1.10", 0, SpcSpAgencyInfo, NULL },
+ { 6, "1.3.6.1.4.1.311.2.1.27", 0, SpcFinancialCriteria, NULL },
+ { 6, "1.3.6.1.4.1.311.2.1.26", 0, SpcMinimalCriteria, NULL },
{ 6, szOID_COUNTRY_NAME, 0, (LPCWSTR)IDS_COUNTRY, NULL },
{ 6, szOID_ORGANIZATION_NAME, 0, (LPCWSTR)IDS_ORGANIZATION, NULL },
{ 6, szOID_ORGANIZATIONAL_UNIT_NAME, 0, (LPCWSTR)IDS_ORGANIZATIONAL_UNIT, NULL },
Modified: trunk/reactos/dll/win32/crypt32/rootstore.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/rootstor…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/rootstore.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/rootstore.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -189,7 +189,7 @@
"\n\tbad name constraints");
if (status & CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT)
pos += snprintf(buf + pos, sizeof(buf) - pos,
- "\n\tunsuported name constraint");
+ "\n\tunsupported name constraint");
if (status & CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT)
pos += snprintf(buf + pos, sizeof(buf) - pos,
"\n\tundefined name constraint");
Modified: trunk/reactos/dll/win32/crypt32/serialize.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/serializ…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/serialize.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/serialize.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -652,21 +652,21 @@
ret = output(handle, fileHeader, sizeof(fileHeader));
if (ret)
{
- memcpy(&interface, pCertInterface, sizeof(interface));
+ interface = *pCertInterface;
interface.serialize = (SerializeElementFunc)CRYPT_SerializeCertNoHash;
ret = CRYPT_SerializeContextsToStream(output, handle, &interface,
store);
}
if (ret)
{
- memcpy(&interface, pCRLInterface, sizeof(interface));
+ interface = *pCRLInterface;
interface.serialize = (SerializeElementFunc)CRYPT_SerializeCRLNoHash;
ret = CRYPT_SerializeContextsToStream(output, handle, &interface,
store);
}
if (ret)
{
- memcpy(&interface, pCTLInterface, sizeof(interface));
+ interface = *pCTLInterface;
interface.serialize = (SerializeElementFunc)CRYPT_SerializeCTLNoHash;
ret = CRYPT_SerializeContextsToStream(output, handle, &interface,
store);
Modified: trunk/reactos/dll/win32/crypt32/sip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/sip.c?re…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/sip.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/sip.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -634,14 +634,17 @@
if (!sip.pfPut || temp != lib)
goto error;
FreeLibrary(temp);
+ temp = NULL;
sip.pfCreate = CRYPT_LoadSIPFunc(pgSubject, szCreate, &temp);
if (!sip.pfCreate || temp != lib)
goto error;
FreeLibrary(temp);
+ temp = NULL;
sip.pfVerify = CRYPT_LoadSIPFunc(pgSubject, szVerify, &temp);
if (!sip.pfVerify || temp != lib)
goto error;
FreeLibrary(temp);
+ temp = NULL;
sip.pfRemove = CRYPT_LoadSIPFunc(pgSubject, szRemoveSigned, &temp);
if (!sip.pfRemove || temp != lib)
goto error;
Modified: trunk/reactos/dll/win32/crypt32/store.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/crypt32/store.c?…
==============================================================================
--- trunk/reactos/dll/win32/crypt32/store.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/crypt32/store.c [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -163,7 +163,7 @@
if (ppStoreContext)
*ppStoreContext = CertDuplicateCertificateContext(context);
}
- return context ? TRUE : FALSE;
+ return context != 0;
}
static void *CRYPT_MemEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev)
@@ -208,7 +208,7 @@
if (ppStoreContext)
*ppStoreContext = CertDuplicateCRLContext(context);
}
- return context ? TRUE : FALSE;
+ return context != 0;
}
static void *CRYPT_MemEnumCrl(PWINECRYPT_CERTSTORE store, void *pPrev)
@@ -253,7 +253,7 @@
if (ppStoreContext)
*ppStoreContext = CertDuplicateCTLContext(context);
}
- return context ? TRUE : FALSE;
+ return context != 0;
}
static void *CRYPT_MemEnumCtl(PWINECRYPT_CERTSTORE store, void *pPrev)
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Wed Apr 3 22:43:22 2013
@@ -52,7 +52,7 @@
reactos/dll/win32/comdlg32 # Synced to Wine 1.3.37
reactos/dll/win32/compstui # Synced to Wine-1.5.19
reactos/dll/win32/credui # Synced to Wine-1.5.4
-reactos/dll/win32/crypt32 # Synced to Wine-1.3.37
+reactos/dll/win32/crypt32 # Synced to Wine-1.5.26
reactos/dll/win32/cryptdlg # Synced to Wine-1.5.4
reactos/dll/win32/cryptdll # Synced to Wine-1.5.4
reactos/dll/win32/cryptnet # Synced to Wine-1.3.37