提交 11222483 编写于 作者: D Dr. Stephen Henson

constify X509_REQ_get0_signature()

Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 60c25873
...@@ -174,9 +174,9 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, ...@@ -174,9 +174,9 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
} }
if (!(cflag & X509_FLAG_NO_SIGDUMP)) { if (!(cflag & X509_FLAG_NO_SIGDUMP)) {
X509_ALGOR *sig_alg; const X509_ALGOR *sig_alg;
ASN1_BIT_STRING *sig; const ASN1_BIT_STRING *sig;
X509_REQ_get0_signature(&sig, &sig_alg, x); X509_REQ_get0_signature(x, &sig, &sig_alg);
if (!X509_signature_print(bp, sig_alg, sig)) if (!X509_signature_print(bp, sig_alg, sig))
goto err; goto err;
} }
......
...@@ -277,8 +277,8 @@ X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req) ...@@ -277,8 +277,8 @@ X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req)
return req->req_info.subject; return req->req_info.subject;
} }
void X509_REQ_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
X509_REQ *req) const X509_ALGOR **palg)
{ {
if (psig != NULL) if (psig != NULL)
*psig = req->signature; *psig = req->signature;
......
...@@ -16,8 +16,9 @@ X509_CRL_get_signature_nid - signature information ...@@ -16,8 +16,9 @@ X509_CRL_get_signature_nid - signature information
int X509_get_signature_nid(const X509 *x); int X509_get_signature_nid(const X509 *x);
const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x); const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
void X509_REQ_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, void X509_REQ_get0_signature(const X509_REQ *crl,
const X509_REQ *crl); const ASN1_BIT_STRING **psig,
const X509_ALGOR **palg);
int X509_REQ_get_signature_nid(const X509_REQ *crl); int X509_REQ_get_signature_nid(const X509_REQ *crl);
void X509_CRL_get0_signature(const X509_CRL *crl, void X509_CRL_get0_signature(const X509_CRL *crl,
......
...@@ -647,8 +647,8 @@ long X509_REQ_get_version(const X509_REQ *req); ...@@ -647,8 +647,8 @@ long X509_REQ_get_version(const X509_REQ *req);
int X509_REQ_set_version(X509_REQ *x, long version); int X509_REQ_set_version(X509_REQ *x, long version);
X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req); X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req);
int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name); int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
void X509_REQ_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
X509_REQ *req); const X509_ALGOR **palg);
int X509_REQ_get_signature_nid(const X509_REQ *req); 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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册