Skip to content

Commit 1c5dc3c

Browse files
authored
Merge pull request #81 from ColtonWilley/wp_rsa_set_keytype_on_import
Set RSA key type on import
2 parents 1e99656 + 93fbad9 commit 1c5dc3c

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
@@ -992,9 +992,11 @@ static int wp_rsa_import_key_data(wp_Rsa* rsa, const OSSL_PARAM params[],
992992

993993
if (priv && (wp_params_count(params) > 2)) {
994994
cnt = WP_RSA_PARAM_NUMS_CNT;
995+
rsa->key.type = RSA_PRIVATE;
995996
}
996997
else {
997998
cnt = WP_RSA_PARAM_PUB_NUMS_CNT;
999+
rsa->key.type = RSA_PUBLIC;
9981000
}
9991001

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

0 commit comments

Comments
 (0)