Add evp_keymgmt_export_to_provider(), for key transfer between providers
authorRichard Levitte <levitte@openssl.org>
Sat, 6 Jul 2019 19:57:15 +0000 (21:57 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 22 Jul 2019 04:18:58 +0000 (06:18 +0200)
commit70a1f7b4d7a0611508f45ef884472b9d84cbe108
treecd5bedc27008fca58dbd88c09b5eafd640ec6fe3
parenta94a3e0d91378b5c478f687a0dbc51914d4ed497
Add evp_keymgmt_export_to_provider(), for key transfer between providers

This function is used to transport private key materia from whatever
is already attached to the EVP_PKEY to the new provider, using key
data export and import functionality.

If a legacy lower level key has been assigned to the EVP_PKEY, we use
its data to create a provider side key, and thereby have a bridge
between old style public key types and the EVP_PKEY on providers.

If successful, this function returns a reference to the appropriate
provider side data for the key.

This can be used by any operation that wants to use this key.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9312)
crypto/evp/build.info
crypto/evp/keymgmt_lib.c [new file with mode: 0644]
crypto/include/internal/asn1_int.h
crypto/include/internal/evp_int.h
doc/internal/man3/evp_keymgmt_export_to_provider.pod [new file with mode: 0644]
doc/man3/EVP_PKEY_ASN1_METHOD.pod