Open Lipovlan opened 1 year ago
Er.... supporting another key type involves a little more than a mere hack of the keymgmt export function. Sure, you can most probably have fairly common functions for all key types you support, but some will have to be different. This means another OSSL_DISPATCH
instance, and another line in the keymgmt
OSSL_ALGORITHM
array.
(actually, there's more, such detecting and correctly declaring the ECC key in the store function load_another_private_key()
, and if you want to be able to use if, signature support)
Right now we can only export RSA keys.
cng_keymgmt_export()
should be able to differentiate between the keys and export into the appropriateOSSL_PARAM
data types (OSSL_PKEY_PARAM_EC_P
,OSSL_PKEY_PARAM_EC_GENERATOR
,OSSL_PKEY_PARAM_EC_PUB_X
andOSSL_PKEY_PARAM_EC_PUB_Y
).Good sources: CNG documentation for DSA and OpenSSL documentation for EC keymgmt.