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

This commit is contained in:
Juan Lang 2006-07-26 10:20:09 -07:00 committed by Alexandre Julliard
parent 06fbe6012f
commit c562957375
1 changed files with 2 additions and 0 deletions

View File

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