1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-02 14:53:14 +02:00

Fixed a win32 password encryption bug in NT service mode

This commit is contained in:
codemastr
2002-08-25 16:35:17 +00:00
parent 1f2e1a8bcf
commit cebae72da4
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -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)
+4 -2
View File
@@ -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;