[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 39/264: windows: suppress UI in all CryptAcquireContext() calls
From: |
gnunet |
Subject: |
[gnurl] 39/264: windows: suppress UI in all CryptAcquireContext() calls |
Date: |
Thu, 30 Apr 2020 16:05:42 +0200 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 7284061361e32d6f4d6308bf41d751601d101ba2
Author: Viktor Szakats <address@hidden>
AuthorDate: Tue Mar 17 23:06:05 2020 +0000
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
---
lib/curl_ntlm_core.c | 2 +-
lib/md4.c | 2 +-
lib/md5.c | 4 ++--
lib/sha256.c | 4 ++--
lib/vtls/schannel.c | 2 +-
src/tool_metalink.c | 12 ++++++------
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
index f9b823b4f..32e29a933 100644
--- a/lib/curl_ntlm_core.c
+++ b/lib/curl_ntlm_core.c
@@ -342,7 +342,7 @@ static bool encrypt_des(const unsigned char *in, unsigned
char *out,
/* Acquire the crypto provider */
if(!CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT))
+ CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
return FALSE;
/* Setup the key blob structure */
diff --git a/lib/md4.c b/lib/md4.c
index 38f1b2bc9..4dab6af7a 100644
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -146,7 +146,7 @@ static void MD4_Init(MD4_CTX *ctx)
ctx->hHash = 0;
if(CryptAcquireContext(&ctx->hCryptProv, NULL, NULL, PROV_RSA_FULL,
- CRYPT_VERIFYCONTEXT)) {
+ CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) {
CryptCreateHash(ctx->hCryptProv, CALG_MD4, 0, 0, &ctx->hHash);
}
}
diff --git a/lib/md5.c b/lib/md5.c
index 3f601b3a4..766158786 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -186,8 +186,8 @@ typedef struct {
static void 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);
}
}
diff --git a/lib/sha256.c b/lib/sha256.c
index 352d577e8..00d98ce46 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -207,8 +207,8 @@ typedef struct {
static void 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);
}
}
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index f665ee340..3b9aef47c 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -2203,7 +2203,7 @@ static void Curl_schannel_checksum(const unsigned char
*input,
memset(checksum, 0, checksumlen);
if(!CryptAcquireContext(&hProv, NULL, NULL, provType,
- CRYPT_VERIFYCONTEXT))
+ CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
return; /* failed */
do {
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;
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 67/264: Revert "cirrus-ci: disable the FreeBSD 13 builds", (continued)
- [gnurl] 67/264: Revert "cirrus-ci: disable the FreeBSD 13 builds", gnunet, 2020/04/30
- [gnurl] 95/264: test1177: verify that all the CURL_VERSION_ bits are documented, gnunet, 2020/04/30
- [gnurl] 116/264: sockfilt: fix race-condition of waiting threads and event handling, gnunet, 2020/04/30
- [gnurl] 128/264: appveyor: use random test server ports based upon APPVEYOR_API_URL, gnunet, 2020/04/30
- [gnurl] 115/264: CI-fuzz: increase fuzz time to 40 minutes, gnunet, 2020/04/30
- [gnurl] 126/264: appveyor: show failed tests in log even if test is ignored, gnunet, 2020/04/30
- [gnurl] 101/264: checksrc: warn on obvious conditional blocks on the same line as if(), gnunet, 2020/04/30
- [gnurl] 133/264: scripts/release-notes.pl: add helper script for RELEASE-NOTES maintenance, gnunet, 2020/04/30
- [gnurl] 132/264: configure: don't check for Security.framework when cross-compiling, gnunet, 2020/04/30
- [gnurl] 74/264: copyright: fix out-of-date copyright ranges and missing headers, gnunet, 2020/04/30
- [gnurl] 39/264: windows: suppress UI in all CryptAcquireContext() calls,
gnunet <=
- [gnurl] 53/264: mbedtls: remove the BACKEND define kludge, gnunet, 2020/04/30
- [gnurl] 61/264: curl_setup: define _WIN32_WINNT_[OS] symbols, gnunet, 2020/04/30
- [gnurl] 55/264: test970: fix static ip:port instead of dynamic values being used, gnunet, 2020/04/30
- [gnurl] 84/264: SSLCERTS.md: Fix example code for setting CA cert file, gnunet, 2020/04/30
- [gnurl] 88/264: writeout_json: Fix data type issues, gnunet, 2020/04/30
- [gnurl] 93/264: KNOWN_BUGS: DoH doesn't inherit all transfer options, gnunet, 2020/04/30
- [gnurl] 179/264: cmake: add aliases so exported target names are available in tree, gnunet, 2020/04/30
- [gnurl] 46/264: writeout_json: use curl_off_t printf() option for the time output, gnunet, 2020/04/30
- [gnurl] 58/264: tests: add test 430, 431 and 432 to verify the --config fix, gnunet, 2020/04/30
- [gnurl] 60/264: curl-functions.m4: remove inappropriate AC_REQUIRE, gnunet, 2020/04/30