EVP: Implement support for key downgrading in backends
authorRichard Levitte <levitte@openssl.org>
Mon, 23 Mar 2020 04:40:47 +0000 (05:40 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 25 Mar 2020 16:01:32 +0000 (17:01 +0100)
commit0abae1636d7054266dd20724c0d5e06617d9f679
tree2237cb7a395a335ba4da5a530d2116b3e5f0e3aa
parentff7262b4f4dfade7d2d6e05dcd3727ecc2bc7a5c
EVP: Implement support for key downgrading in backends

Downgrading EVP_PKEYs from containing provider side internal keys to
containing legacy keys demands support in the EVP_PKEY_ASN1_METHOD.

This became a bit elaborate because the code would be almost exactly
the same as the import functions int EVP_KEYMGMT.  Therefore, we end
up moving most of the code to common backend support files that can be
used both by legacy backend code and by our providers.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11375)
28 files changed:
crypto/dh/build.info
crypto/dh/dh_ameth.c
crypto/dh/dh_backend.c [new file with mode: 0644]
crypto/dsa/build.info
crypto/dsa/dsa_ameth.c
crypto/dsa/dsa_backend.c [new file with mode: 0644]
crypto/ec/build.info
crypto/ec/ec_ameth.c
crypto/ec/ec_backend.c [new file with mode: 0644]
crypto/ec/ecx_backend.c [new file with mode: 0644]
crypto/ec/ecx_backend.h [new file with mode: 0644]
crypto/ec/ecx_meth.c
crypto/ffc/build.info
crypto/ffc/ffc_backend.c [new file with mode: 0644]
crypto/rsa/build.info
crypto/rsa/rsa_ameth.c
crypto/rsa/rsa_backend.c [new file with mode: 0644]
include/crypto/dh.h
include/crypto/dsa.h
include/crypto/ec.h
include/crypto/ecx.h
include/crypto/rsa.h
include/internal/ffc.h
providers/implementations/keymgmt/dh_kmgmt.c
providers/implementations/keymgmt/dsa_kmgmt.c
providers/implementations/keymgmt/ec_kmgmt.c
providers/implementations/keymgmt/ecx_kmgmt.c
providers/implementations/keymgmt/rsa_kmgmt.c