New accessor X509_REQ_get_X509_PUBKEY()
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
835911b845
commit
1f143e08a5
@ -129,11 +129,15 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (!(cflag & X509_FLAG_NO_PUBKEY)) {
|
if (!(cflag & X509_FLAG_NO_PUBKEY)) {
|
||||||
|
X509_PUBKEY *xpkey;
|
||||||
|
ASN1_OBJECT *koid;
|
||||||
if (BIO_write(bp, " Subject Public Key Info:\n", 33) <= 0)
|
if (BIO_write(bp, " Subject Public Key Info:\n", 33) <= 0)
|
||||||
goto err;
|
goto err;
|
||||||
if (BIO_printf(bp, "%12sPublic Key Algorithm: ", "") <= 0)
|
if (BIO_printf(bp, "%12sPublic Key Algorithm: ", "") <= 0)
|
||||||
goto err;
|
goto err;
|
||||||
if (i2a_ASN1_OBJECT(bp, ri->pubkey->algor->algorithm) <= 0)
|
xpkey = X509_REQ_get_X509_PUBKEY(x);
|
||||||
|
X509_PUBKEY_get0_param(&koid, NULL, NULL, NULL, xpkey);
|
||||||
|
if (i2a_ASN1_OBJECT(bp, koid) <= 0)
|
||||||
goto err;
|
goto err;
|
||||||
if (BIO_puts(bp, "\n") <= 0)
|
if (BIO_puts(bp, "\n") <= 0)
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -117,6 +117,11 @@ EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req)
|
|||||||
return (X509_PUBKEY_get(req->req_info.pubkey));
|
return (X509_PUBKEY_get(req->req_info.pubkey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req)
|
||||||
|
{
|
||||||
|
return req->req_info.pubkey;
|
||||||
|
}
|
||||||
|
|
||||||
int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
|
int X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
|
||||||
{
|
{
|
||||||
EVP_PKEY *xk = NULL;
|
EVP_PKEY *xk = NULL;
|
||||||
|
@ -759,6 +759,7 @@ int X509_REQ_get_signature_nid(const X509_REQ *req);
|
|||||||
int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp);
|
int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp);
|
||||||
int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
|
int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
|
||||||
EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
|
EVP_PKEY *X509_REQ_get_pubkey(X509_REQ *req);
|
||||||
|
X509_PUBKEY *X509_REQ_get_X509_PUBKEY(X509_REQ *req);
|
||||||
int X509_REQ_extension_nid(int nid);
|
int X509_REQ_extension_nid(int nid);
|
||||||
int *X509_REQ_get_extension_nids(void);
|
int *X509_REQ_get_extension_nids(void);
|
||||||
void X509_REQ_set_extension_nids(int *nids);
|
void X509_REQ_set_extension_nids(int *nids);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user