mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 13:10:28 +00:00
rsaenh: Explicitly clear unused memory when exporting a public key.
This commit is contained in:
parent
49c11910d8
commit
1004b57c55
@ -362,6 +362,9 @@ BOOL export_public_key_impl(BYTE *pbDest, const KEY_CONTEXT *pKeyContext, DWORD
|
||||
{
|
||||
mp_to_unsigned_bin(&pKeyContext->rsa.N, pbDest);
|
||||
reverse_bytes(pbDest, dwKeyLen);
|
||||
if (mp_unsigned_bin_size(&pKeyContext->rsa.N) < dwKeyLen)
|
||||
memset(pbDest + mp_unsigned_bin_size(&pKeyContext->rsa.N), 0,
|
||||
dwKeyLen - mp_unsigned_bin_size(&pKeyContext->rsa.N));
|
||||
*pdwPubExp = (DWORD)mp_get_int(&pKeyContext->rsa.e);
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user