diff --git a/Changes b/Changes index 3dd48e9a4..79a9ae80f 100644 --- a/Changes +++ b/Changes @@ -1559,4 +1559,5 @@ seen. gmtime warning still there by Alzirr - Compile fix regarding above fix - Added vhost::swhois requested by FrostByghte (#0000171) - +- Fixed a win32 password encryption bug when in NT service mode reported by simonbell + (#0000285) diff --git a/src/auth.c b/src/auth.c index 3dd52e434..e09b1d532 100644 --- a/src/auth.c +++ b/src/auth.c @@ -200,7 +200,8 @@ int Auth_Check(aClient *cptr, anAuthStruct *as, char *para) HCRYPTHASH hHash; char buf2[512]; DWORD size = 512; - if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0)) + if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, + CRYPT_NEWKEYSET)) return -1; if (!CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash)) return -1; @@ -243,7 +244,8 @@ int Auth_Check(aClient *cptr, anAuthStruct *as, char *para) HCRYPTHASH hHash; char buf2[512]; DWORD size = 512; - if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, 0)) + if (!CryptAcquireContext(&hProv, NULL, NULL, PROV_RSA_FULL, + CRYPT_NEWKEYSET)) return -1; if (!CryptCreateHash(hProv, CALG_SHA1, 0, 0, &hHash)) return -1;