Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/crypt32/cert.c | 10 +++++----- dlls/crypt32/crypt32_private.h | 2 +- dlls/crypt32/main.c | 2 +- dlls/crypt32/msg.c | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index a7a2605e6b..c44e4bc30b 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -2169,7 +2169,7 @@ BOOL WINAPI CryptHashCertificate(HCRYPTPROV_LEGACY hCryptProv, ALG_ID Algid, pbEncoded, cbEncoded, pbComputedHash, pcbComputedHash);
if (!hCryptProv) - hCryptProv = CRYPT_GetDefaultProvider(); + hCryptProv = I_CryptGetDefaultCryptProv(0); if (!Algid) Algid = CALG_SHA1; if (ret) @@ -2198,7 +2198,7 @@ BOOL WINAPI CryptHashPublicKeyInfo(HCRYPTPROV_LEGACY hCryptProv, ALG_ID Algid, dwCertEncodingType, pInfo, pbComputedHash, pcbComputedHash);
if (!hCryptProv) - hCryptProv = CRYPT_GetDefaultProvider(); + hCryptProv = I_CryptGetDefaultCryptProv(0); if (!Algid) Algid = CALG_MD5; if ((dwCertEncodingType & CERT_ENCODING_TYPE_MASK) != X509_ASN_ENCODING) @@ -2250,7 +2250,7 @@ BOOL WINAPI CryptHashToBeSigned(HCRYPTPROV_LEGACY hCryptProv, HCRYPTHASH hHash;
if (!hCryptProv) - hCryptProv = CRYPT_GetDefaultProvider(); + hCryptProv = I_CryptGetDefaultCryptProv(0); oidInfo = CryptFindOIDInfo(CRYPT_OID_INFO_OID_KEY, info->SignatureAlgorithm.pszObjId, 0); if (!oidInfo) @@ -2299,7 +2299,7 @@ BOOL WINAPI CryptSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HANDLE hCryptProv, if (info->dwGroupId == CRYPT_HASH_ALG_OID_GROUP_ID) { if (!hCryptProv) - hCryptProv = CRYPT_GetDefaultProvider(); + hCryptProv = I_CryptGetDefaultCryptProv(0); ret = CryptCreateHash(hCryptProv, info->u.Algid, 0, 0, &hHash); if (ret) { @@ -2423,7 +2423,7 @@ static BOOL CRYPT_VerifySignature(HCRYPTPROV_LEGACY hCryptProv, DWORD dwCertEnco pubKeyID = hashID; /* Load the default provider if necessary */ if (!hCryptProv) - hCryptProv = CRYPT_GetDefaultProvider(); + hCryptProv = I_CryptGetDefaultCryptProv(0); ret = CryptImportPublicKeyInfoEx(hCryptProv, dwCertEncodingType, pubKeyInfo, pubKeyID, 0, NULL, &key); if (ret) diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index e58db989b7..c6e20120fc 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -149,7 +149,7 @@ BOOL WINAPI CRYPT_AsnEncodePubKeyInfoNoNull(DWORD dwCertEncodingType, /* Returns a handle to the default crypto provider; loads it if necessary. * Returns NULL on failure. */ -HCRYPTPROV CRYPT_GetDefaultProvider(void) DECLSPEC_HIDDEN; +HCRYPTPROV WINAPI I_CryptGetDefaultCryptProv(DWORD);
HINSTANCE hInstance DECLSPEC_HIDDEN;
diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c index d93fb91677..d37bf4a712 100644 --- a/dlls/crypt32/main.c +++ b/dlls/crypt32/main.c @@ -56,7 +56,7 @@ BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved) return TRUE; }
-HCRYPTPROV CRYPT_GetDefaultProvider(void) +static HCRYPTPROV CRYPT_GetDefaultProvider(void) { if (!hDefProv) { diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 005fbf2c1f..f37c462aa9 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -567,7 +567,7 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo, prov = info->hCryptProv; else { - prov = CRYPT_GetDefaultProvider(); + prov = I_CryptGetDefaultCryptProv(0); dwFlags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG; } msg = CryptMemAlloc(sizeof(CHashEncodeMsg)); @@ -1956,7 +1956,7 @@ static HCRYPTMSG CEnvelopedEncodeMsg_Open(DWORD dwFlags, prov = info->hCryptProv; else { - prov = CRYPT_GetDefaultProvider(); + prov = I_CryptGetDefaultCryptProv(0); dwFlags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG; } msg = CryptMemAlloc(sizeof(CEnvelopedEncodeMsg)); @@ -3545,7 +3545,7 @@ HCRYPTMSG WINAPI CryptMsgOpenToDecode(DWORD dwMsgEncodingType, DWORD dwFlags, msg->crypt_prov = hCryptProv; else { - msg->crypt_prov = CRYPT_GetDefaultProvider(); + msg->crypt_prov = I_CryptGetDefaultCryptProv(0); msg->base.open_flags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG; } memset(&msg->u, 0, sizeof(msg->u));