Add X509_REQ_get0_pubkey method
Reviewed-by: Stephen Henson <steve@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
0517538d1a
commit
97458daade
4 changed files with 16 additions and 5 deletions
|
@ -115,6 +115,13 @@ EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
|
|||
return (X509_PUBKEY_get(req->req_info.pubkey));
|
||||
}
|
||||
|
||||
EVP_PKEY *X509_REQ_get0_pubkey(X509_REQ *req)
|
||||
{
|
||||
if (req == NULL)
|
||||
return NULL;
|
||||
return (X509_PUBKEY_get0(req->req_info.pubkey));
|
||||
}
|
||||
|
||||
X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req)
|
||||
{
|
||||
return req->req_info.pubkey;
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
=head1 NAME
|
||||
|
||||
X509_get_pubkey, X509_get0_pubkey, X509_set_pubkey, X509_get_X509_PUBKEY,
|
||||
X509_REQ_get_pubkey, X509_REQ_set_pubkey, X509_REQ_get_X509_PUBKEY - get or
|
||||
set certificate or certificate request public key.
|
||||
X509_REQ_get_pubkey, X509_REQ_get0_pubkey, X509_REQ_set_pubkey,
|
||||
X509_REQ_get_X509_PUBKEY - get or set certificate or certificate request
|
||||
public key.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
@ -16,6 +17,7 @@ set certificate or certificate request public key.
|
|||
X509_PUBKEY *X509_get_X509_PUBKEY(X509 *x);
|
||||
|
||||
EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
|
||||
EVP_PKEY *X509_REQ_get0_pubkey(X509_REQ *req);
|
||||
int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
|
||||
X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *x);
|
||||
|
||||
|
@ -35,8 +37,8 @@ must not be freed up after use.
|
|||
X509_set_pubkey() attempts to set the public key for certificate B<x> to
|
||||
B<pkey>. The key B<pkey> should be freed up after use.
|
||||
|
||||
X509_REQ_get_pubkey(), X509_REQ_set_pubkey() and X509_REQ_get_X509_PUBKEY()
|
||||
are similar but operate on certificate request B<req>.
|
||||
X509_REQ_get_pubkey(), X509_REQ_get0_pubkey(), X509_REQ_set_pubkey() and
|
||||
X509_REQ_get_X509_PUBKEY() are similar but operate on certificate request B<req>.
|
||||
|
||||
=head1 NOTES
|
||||
|
||||
|
@ -51,7 +53,7 @@ X509_get_pubkey(), X509_get0_pubkey(), X509_get_X509_PUBKEY(),
|
|||
X509_REQ_get_pubkey() and X509_REQ_get_X509_PUBKEY() return a public key or
|
||||
B<NULL> if an error occurred.
|
||||
|
||||
X509_set_pubkey() and X509_REQ_set_pubkey() rerturn 1 for success and 0
|
||||
X509_set_pubkey() and X509_REQ_set_pubkey() return 1 for success and 0
|
||||
for failure.
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
|
|
@ -696,6 +696,7 @@ int X509_REQ_get_signature_nid(const X509_REQ *req);
|
|||
int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp);
|
||||
int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
|
||||
EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
|
||||
EVP_PKEY *X509_REQ_get0_pubkey(X509_REQ *req);
|
||||
X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req);
|
||||
int X509_REQ_extension_nid(int nid);
|
||||
int *X509_REQ_get_extension_nids(void);
|
||||
|
|
|
@ -4124,3 +4124,4 @@ DSA_meth_get_sign_setup 3989 1_1_0 EXIST::FUNCTION:DSA
|
|||
DSA_get0_engine 3990 1_1_0 EXIST::FUNCTION:DSA
|
||||
X509_VERIFY_PARAM_set_auth_level 3991 1_1_0 EXIST::FUNCTION:
|
||||
X509_VERIFY_PARAM_get_auth_level 3992 1_1_0 EXIST::FUNCTION:
|
||||
X509_REQ_get0_pubkey 3993 1_1_0 EXIST::FUNCTION:
|
||||
|
|
Loading…
Reference in a new issue