Skip to content

Commit 93fbad9

Browse files
committed
Set RSA key type on import
1 parent 5eeba61 commit 93fbad9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/wp_rsa_kmgmt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,11 @@ static int wp_rsa_import_key_data(wp_Rsa* rsa, const OSSL_PARAM params[],
979979

980980
if (priv) {
981981
cnt = WP_RSA_PARAM_NUMS_CNT;
982+
rsa->key.type = RSA_PRIVATE;
982983
}
983984
else {
984985
cnt = WP_RSA_PARAM_PUB_NUMS_CNT;
986+
rsa->key.type = RSA_PUBLIC;
985987
}
986988

987989
for (i = 0; ok && (i < cnt); i++) {

0 commit comments

Comments
 (0)