Extend EVP_PKEY_copy_parameters()
authorDr. Stephen Henson <steve@openssl.org>
Sun, 13 Dec 2015 17:28:40 +0000 (17:28 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 14 Dec 2015 23:06:14 +0000 (23:06 +0000)
commit2986ecdc08016de978f1134315623778420b51e5
treed553d2766381f7bd4b04b38fb7f472379d6e903c
parentd911097d7c93e4cfeab624b34d73fe51da158b69
Extend EVP_PKEY_copy_parameters()

Make EVP_PKEY_copy_parameters() work if the destination has no type
(e.g. if obtained from EVP_PKEY_new()) or the underlying key is NULL.
This is useful where we want to copy the parameters from an existing
key to a new key.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
crypto/dh/dh_ameth.c
crypto/dsa/dsa_ameth.c
crypto/ec/ec_ameth.c
crypto/evp/p_lib.c