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:
dkulwin 2015-10-29 15:07:09 -05:00
parent c4fb7d76ee
commit 728c299d67

View File

@ -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;
}