]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
When creationg a hash, a persisted private key is unneeded.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Fri, 4 Dec 2009 06:50:32 +0000 (01:50 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Fri, 4 Dec 2009 06:50:32 +0000 (01:50 -0500)
This patch avoids a possibility that calling CryptAcquireContext()
cause an accss error.
see also http://support.microsoft.com/kb/238187/en-us/

SVN-Revision: 1698

libarchive/archive_windows.c

index 7444002821d5885f13b5fab9d58e9cef156b76b7..78fe8c95d9df7d99d3224c3e9bc13ea192bb24a0 100644 (file)
@@ -1162,7 +1162,7 @@ Digest_Init(Digest_CTX *ctx, ALG_ID algId)
 
        ctx->valid = 0;
        if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL,
-           PROV_RSA_FULL, 0)) {
+           PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
                if (GetLastError() != NTE_BAD_KEYSET)
                        return;
                if (!CryptAcquireContext(&ctx->cryptProv, NULL, NULL,