@@ -355,6 +355,29 @@ pub unsafe extern "C" fn parsec_provider_kmgmt_import_types(
355
355
}
356
356
}
357
357
358
+ /*
359
+ should return an array of descriptor OSSL_PARAM for data indicated by selection, for parameters that
360
+ OSSL_FUNC_keymgmt_import() can handle
361
+ */
362
+ pub unsafe extern "C" fn parsec_provider_ecdsa_kmgmt_import_types (
363
+ selection : std:: os:: raw:: c_int ,
364
+ ) -> * const OSSL_PARAM {
365
+ if selection & OSSL_KEYMGMT_SELECT_PUBLIC_KEY as std:: os:: raw:: c_int != 0 {
366
+ static ONCE_INIT : std:: sync:: Once = std:: sync:: Once :: new ( ) ;
367
+ static mut IMPORT_TYPES_TABLE : [ OSSL_PARAM ; 1 ] = [ ossl_param ! ( ) ; 1 ] ;
368
+
369
+ ONCE_INIT . call_once ( || {
370
+ IMPORT_TYPES_TABLE = [
371
+ ossl_param ! ( ) ,
372
+ ] ;
373
+ } ) ;
374
+
375
+ IMPORT_TYPES_TABLE . as_ptr ( )
376
+ } else {
377
+ std:: ptr:: null_mut ( )
378
+ }
379
+ }
380
+
358
381
/*
359
382
should check if the data subset indicated by selection in keydata1 and keydata2 match.
360
383
It is assumed that the caller has ensured that keydata1 and keydata2 are both owned by the implementation of this function.
@@ -460,6 +483,8 @@ const OSSL_FUNC_KEYMGMT_HAS_PTR: KeyMgmtHasPtr = parsec_provider_kmgmt_has;
460
483
const OSSL_FUNC_KEYMGMT_IMPORT_PTR : KeyMgmtImportPtr = parsec_provider_kmgmt_import;
461
484
const OSSL_FUNC_KEYMGMT_IMPORT_TYPES_PTR : KeyMgmtImportTypesPtr =
462
485
parsec_provider_kmgmt_import_types;
486
+ const OSSL_FUNC_KEYMGMT_ECDSA_IMPORT_TYPES_PTR : KeyMgmtImportTypesPtr =
487
+ parsec_provider_ecdsa_kmgmt_import_types;
463
488
const OSSL_FUNC_KEYMGMT_SET_PARAMS_PTR : KeyMgmtSetParamsPtr = parsec_provider_kmgmt_set_params;
464
489
const OSSL_FUNC_KEYMGMT_GET_PARAMS_PTR : KeyMgmtGetParamsPtr = parsec_provider_kmgmt_get_params;
465
490
const OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS_PTR : KeyMgmtSettableParamsPtr =
@@ -524,7 +549,7 @@ const PARSEC_PROVIDER_KEYMGMT_ECDSA_IMPL: [OSSL_DISPATCH; 13] = [
524
549
unsafe {
525
550
ossl_dispatch ! (
526
551
OSSL_FUNC_KEYMGMT_IMPORT_TYPES ,
527
- OSSL_FUNC_KEYMGMT_IMPORT_TYPES_PTR
552
+ OSSL_FUNC_KEYMGMT_ECDSA_IMPORT_TYPES_PTR
528
553
)
529
554
} ,
530
555
unsafe {
0 commit comments