Skip to content

Commit 8c61aa7

Browse files
committed
kmgmt: Update import types to support RSA public key params
Signed-off-by: Gowtham Suresh Kumar <[email protected]>
1 parent 2bcd694 commit 8c61aa7

File tree

1 file changed

+4
-2
lines changed
  • parsec-openssl-provider/src/keymgmt

1 file changed

+4
-2
lines changed

parsec-openssl-provider/src/keymgmt/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,15 @@ OSSL_FUNC_keymgmt_import() can handle
219219
pub unsafe extern "C" fn parsec_provider_kmgmt_import_types(
220220
selection: std::os::raw::c_int,
221221
) -> *const OSSL_PARAM {
222-
if selection & OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS as std::os::raw::c_int != 0 {
222+
if selection & OSSL_KEYMGMT_SELECT_ALL_PARAMETERS as std::os::raw::c_int != 0 {
223223
static ONCE_INIT: std::sync::Once = std::sync::Once::new();
224-
static mut IMPORT_TYPES_TABLE: [OSSL_PARAM; 2] = [ossl_param!(); 2];
224+
static mut IMPORT_TYPES_TABLE: [OSSL_PARAM; 4] = [ossl_param!(); 4];
225225

226226
ONCE_INIT.call_once(|| {
227227
IMPORT_TYPES_TABLE = [
228228
ossl_param!(PARSEC_PROVIDER_KEY_NAME, OSSL_PARAM_UTF8_PTR),
229+
ossl_param!(OSSL_PKEY_PARAM_RSA_N, OSSL_PARAM_UNSIGNED_INTEGER),
230+
ossl_param!(OSSL_PKEY_PARAM_RSA_E, OSSL_PARAM_UNSIGNED_INTEGER),
229231
ossl_param!(),
230232
];
231233
});

0 commit comments

Comments
 (0)