mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-25 15:04:54 +02:00
Fix CNG hash GetProperty bug
ssh_digest_start was using a pointer to the algorithm handle instead of the algorithm handle itself in the BCryptGetProperty call. It was also querying for the hash length when it should have been querying for the hash object length.
This commit is contained in:
parent
c4fb7d76ee
commit
728c299d67
@ -147,7 +147,7 @@ struct ssh_digest_ctx *
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((hr = BCryptGetProperty(&(ret->cng_alg_handle), BCRYPT_HASH_LENGTH,(PBYTE)&cbHash,sizeof(DWORD),&cbData,0)) != S_OK){
|
||||
if ((hr = BCryptGetProperty(ret->cng_alg_handle, BCRYPT_OBJECT_LENGTH, (PBYTE)&cbHash, sizeof(DWORD), &cbData, 0)) != S_OK){
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user