diff options
author | Viktor Szakats <commit@vsz.me> | 2020-03-17 23:06:05 +0000 |
---|---|---|
committer | Viktor Szakats <commit@vsz.me> | 2020-03-17 23:08:02 +0000 |
commit | 7284061361e32d6f4d6308bf41d751601d101ba2 (patch) | |
tree | 3525264e37d45147347f11ba918a484e85960b35 /src | |
parent | ab9dc5ae2a86e42bb087986587e68cefdf76531d (diff) |
windows: suppress UI in all CryptAcquireContext() calls
Ref: https://docs.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-cryptacquirecontexta#parameters
Reviewed-by: Marc Hörsken
Closes https://github.com/curl/curl/pull/5088
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_metalink.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tool_metalink.c b/src/tool_metalink.c index f87f686f1..e8629353f 100644 --- a/src/tool_metalink.c +++ b/src/tool_metalink.c @@ -336,8 +336,8 @@ static void win32_crypto_final(struct win32_crypto_hash *ctx, static int MD5_Init(MD5_CTX *ctx) { - if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { + if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_FULL, + CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { CryptCreateHash(ctx->hCryptProv, CALG_MD5, 0, 0, &ctx->hHash); } return 1; @@ -357,8 +357,8 @@ static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) static int SHA1_Init(SHA_CTX *ctx) { - if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, - PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { + if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_FULL, + CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { CryptCreateHash(ctx->hCryptProv, CALG_SHA1, 0, 0, &ctx->hHash); } return 1; @@ -378,8 +378,8 @@ static void SHA1_Final(unsigned char digest[20], SHA_CTX *ctx) static int SHA256_Init(SHA256_CTX *ctx) { - if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, - PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) { + if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_AES, + CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { CryptCreateHash(ctx->hCryptProv, CALG_SHA_256, 0, 0, &ctx->hHash); } return 1; |