x509: publish X509_PUBKEY_dup

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9353)
This commit is contained in:
Dr. Matthias St. Pierre 2019-07-12 12:42:39 +02:00
parent 9b977675ad
commit a8f1aabd4b
5 changed files with 7 additions and 5 deletions

View File

@ -200,10 +200,7 @@ OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer,
/*
* id-regCtrl-protocolEncrKey Control (section 6.6)
*
* For some reason X509_PUBKEY_dup() is not implemented in OpenSSL X509
* TODO: check whether that should go elsewhere
*/
static IMPLEMENT_ASN1_DUP_FUNCTION(X509_PUBKEY)
IMPLEMENT_CRMF_CTRL_FUNC(protocolEncrKey, X509_PUBKEY, regCtrl)
/*-

View File

@ -56,6 +56,7 @@ ASN1_SEQUENCE_cb(X509_PUBKEY, pubkey_cb) = {
} ASN1_SEQUENCE_END_cb(X509_PUBKEY, X509_PUBKEY)
IMPLEMENT_ASN1_FUNCTIONS(X509_PUBKEY)
IMPLEMENT_ASN1_DUP_FUNCTION(X509_PUBKEY)
/* TODO should better be called X509_PUBKEY_set1 */
int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)

View File

@ -2,8 +2,9 @@
=head1 NAME
X509_PUBKEY_new, X509_PUBKEY_free, X509_PUBKEY_set, X509_PUBKEY_get0,
X509_PUBKEY_get, d2i_PUBKEY, i2d_PUBKEY, d2i_PUBKEY_bio, d2i_PUBKEY_fp,
X509_PUBKEY_new, X509_PUBKEY_free, X509_PUBKEY_dup,
X509_PUBKEY_set, X509_PUBKEY_get0, X509_PUBKEY_get,
d2i_PUBKEY, i2d_PUBKEY, d2i_PUBKEY_bio, d2i_PUBKEY_fp,
i2d_PUBKEY_fp, i2d_PUBKEY_bio, X509_PUBKEY_set0_param,
X509_PUBKEY_get0_param - SubjectPublicKeyInfo public key functions
@ -13,6 +14,7 @@ X509_PUBKEY_get0_param - SubjectPublicKeyInfo public key functions
X509_PUBKEY *X509_PUBKEY_new(void);
void X509_PUBKEY_free(X509_PUBKEY *a);
X509_PUBKEY *X509_PUBKEY_dup(const X509_PUBKEY *a);
int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey);
EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key);

View File

@ -470,6 +470,7 @@ DECLARE_ASN1_DUP_FUNCTION(X509_ALGOR)
DECLARE_ASN1_DUP_FUNCTION(X509_ATTRIBUTE)
DECLARE_ASN1_DUP_FUNCTION(X509_CRL)
DECLARE_ASN1_DUP_FUNCTION(X509_EXTENSION)
DECLARE_ASN1_DUP_FUNCTION(X509_PUBKEY)
DECLARE_ASN1_DUP_FUNCTION(X509_REQ)
DECLARE_ASN1_DUP_FUNCTION(X509_REVOKED)
int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype,

View File

@ -4689,3 +4689,4 @@ EVP_KEYMGMT_fetch 4794 3_0_0 EXIST::FUNCTION:
EVP_KEYMGMT_up_ref 4795 3_0_0 EXIST::FUNCTION:
EVP_KEYMGMT_free 4796 3_0_0 EXIST::FUNCTION:
EVP_KEYMGMT_provider 4797 3_0_0 EXIST::FUNCTION:
X509_PUBKEY_dup 4798 3_0_0 EXIST::FUNCTION: