Skip to content

Commit 2bcd694

Browse files
committed
kmgmt: Add RSA QueryOperationName support
Signed-off-by: Gowtham Suresh Kumar <[email protected]>
1 parent 24aff36 commit 2bcd694

File tree

1 file changed

+16
-0
lines changed
  • parsec-openssl-provider/src/keymgmt

1 file changed

+16
-0
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,16 @@ pub unsafe extern "C" fn parsec_provider_keymgmt_dup(
299299
}
300300
}
301301

302+
pub unsafe extern "C" fn parsec_provider_kmgmt_query_operation_name(
303+
_operation_id: std::os::raw::c_int,
304+
) -> *const std::os::raw::c_char {
305+
return PARSEC_PROVIDER_RSA_NAME.as_ptr() as *const std::os::raw::c_char;
306+
}
307+
308+
const OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME_PTR: KeyMgmtQueryOperationNamePtr =
309+
parsec_provider_kmgmt_query_operation_name;
310+
pub type KeyMgmtQueryOperationNamePtr =
311+
unsafe extern "C" fn(std::os::raw::c_int) -> *const std::os::raw::c_char;
302312
pub type KeyMgmtDupPtr = unsafe extern "C" fn(VOID_PTR, std::os::raw::c_int) -> VOID_PTR;
303313
pub type KeyMgmtNewPtr = unsafe extern "C" fn(VOID_PTR) -> VOID_PTR;
304314
pub type KeyMgmtFreePtr = unsafe extern "C" fn(VOID_PTR);
@@ -336,6 +346,12 @@ const PARSEC_PROVIDER_KEYMGMT_IMPL: [OSSL_DISPATCH; 10] = [
336346
OSSL_FUNC_KEYMGMT_IMPORT_TYPES_PTR
337347
)
338348
},
349+
unsafe {
350+
ossl_dispatch!(
351+
OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME,
352+
OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME_PTR
353+
)
354+
},
339355
unsafe {
340356
ossl_dispatch!(
341357
OSSL_FUNC_KEYMGMT_SET_PARAMS,

0 commit comments

Comments
 (0)