Commit c5629573 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

rsaenh: Public keys should be exported with the CALG_RSA_KEYX alg_id.

parent 06fbe601
......@@ -2195,6 +2195,8 @@ BOOL WINAPI RSAENH_CPExportKey(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTKEY hPubK
pBlobHeader->bVersion = CUR_BLOB_VERSION;
pBlobHeader->reserved = 0;
pBlobHeader->aiKeyAlg = pCryptKey->aiAlgid;
if (pBlobHeader->aiKeyAlg == CALG_RSA_SIGN)
pBlobHeader->aiKeyAlg = CALG_RSA_KEYX;
pRSAPubKey->magic = RSAENH_MAGIC_RSA1;
pRSAPubKey->bitlen = pCryptKey->dwKeyLen << 3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment