From e1c7eead30a8171cb2ddc4fcb4e7cd8913d47154 Mon Sep 17 00:00:00 2001 From: codemastr Date: Sun, 25 Aug 2002 16:54:00 +0000 Subject: [PATCH] ... --- src/auth.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/auth.c b/src/auth.c index e09b1d532..3d1e45431 100644 --- a/src/auth.c +++ b/src/auth.c @@ -201,7 +201,7 @@ int Auth_Check(aClient *cptr, anAuthStruct *as, char *para) char buf2[512]; DWORD size = 512; if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, - CRYPT_NEWKEYSET)) + CRYPT_VERIFYCONTEXT)) return -1; if (!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash)) return -1; @@ -245,7 +245,7 @@ int Auth_Check(aClient *cptr, anAuthStruct *as, char *para) char buf2[512]; DWORD size = 512; if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, - CRYPT_NEWKEYSET)) + CRYPT_VERIFYCONTEXT)) return -1; if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return -1; @@ -373,7 +373,8 @@ char *Auth_Make(short type, char *para) HCRYPTPROV hProv; HCRYPTHASH hHash; DWORD size = 512; - if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0)) + if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, + CRYPT_VERIFYCONTEXT)) return NULL; if (!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash)) return NULL; @@ -407,7 +408,8 @@ char *Auth_Make(short type, char *para) HCRYPTPROV hProv; HCRYPTHASH hHash; DWORD size = 512; - if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0)) + if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, + CRYPT_VERIFYCONTEXT)) return NULL; if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return NULL;