diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-03-19 18:45:43 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-03-28 16:38:57 +1000 |
commit | 2145ba5e8383184d7f212500ec2f759bdf08503a (patch) | |
tree | a862106cc508e75f170b3105e3b5919fb38219d3 /include | |
parent | c464583483df70ad8df9907168bf015d672742bd (diff) |
Implement EVP_PKEY_dup() function
Fixes #14501
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14624)
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/asn1.h | 1 | ||||
-rw-r--r-- | include/crypto/x509.h | 2 | ||||
-rw-r--r-- | include/openssl/evp.h | 1 | ||||
-rw-r--r-- | include/openssl/rsa.h | 1 |
4 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/asn1.h b/include/crypto/asn1.h index b812bdd614..17d5f637ef 100644 --- a/include/crypto/asn1.h +++ b/include/crypto/asn1.h @@ -83,6 +83,7 @@ struct evp_pkey_asn1_method_st { EVP_KEYMGMT *to_keymgmt, OSSL_LIB_CTX *libctx, const char *propq); OSSL_CALLBACK *import_from; + int (*copy) (EVP_PKEY *to, EVP_PKEY *from); int (*priv_decode_ex) (EVP_PKEY *pk, const PKCS8_PRIV_KEY_INFO *p8inf, diff --git a/include/crypto/x509.h b/include/crypto/x509.h index 3ff903541f..936ab790de 100644 --- a/include/crypto/x509.h +++ b/include/crypto/x509.h @@ -325,6 +325,8 @@ int ossl_x509_add_cert_new(STACK_OF(X509) **sk, X509 *cert, int flags); int ossl_x509_add_certs_new(STACK_OF(X509) **p_sk, STACK_OF(X509) *certs, int flags); +STACK_OF(X509_ATTRIBUTE) *ossl_x509at_dup(const STACK_OF(X509_ATTRIBUTE) *x); + int ossl_x509_PUBKEY_get0_libctx(OSSL_LIB_CTX **plibctx, const char **ppropq, const X509_PUBKEY *key); /* Calculate default key identifier according to RFC 5280 section 4.2.1.2 (1) */ diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 9f3efbd2f5..26a97008ba 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1318,6 +1318,7 @@ struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); EVP_PKEY *EVP_PKEY_new(void); int EVP_PKEY_up_ref(EVP_PKEY *pkey); +EVP_PKEY *EVP_PKEY_dup(EVP_PKEY *pkey); void EVP_PKEY_free(EVP_PKEY *pkey); EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h index 8822345d5a..573ba003cc 100644 --- a/include/openssl/rsa.h +++ b/include/openssl/rsa.h @@ -319,6 +319,7 @@ struct rsa_pss_params_st { }; DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS) +DECLARE_ASN1_DUP_FUNCTION(RSA_PSS_PARAMS) typedef struct rsa_oaep_params_st { X509_ALGOR *hashFunc; |