mirror of https://github.com/openssl/openssl.git
Merge cddba94c0c
into b8c46cba5f
This commit is contained in:
commit
92ca422131
|
@ -46,18 +46,7 @@ OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid)
|
||||||
/* Set requestorName from an X509_NAME structure */
|
/* Set requestorName from an X509_NAME structure */
|
||||||
int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm)
|
int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm)
|
||||||
{
|
{
|
||||||
GENERAL_NAME *gen = GENERAL_NAME_new();
|
return GENERAL_NAME_set1_X509_NAME(&req->tbsRequest.requestorName, nm);
|
||||||
|
|
||||||
if (gen == NULL)
|
|
||||||
return 0;
|
|
||||||
if (!X509_NAME_set(&gen->d.directoryName, nm)) {
|
|
||||||
GENERAL_NAME_free(gen);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
gen->type = GEN_DIRNAME;
|
|
||||||
GENERAL_NAME_free(req->tbsRequest.requestorName);
|
|
||||||
req->tbsRequest.requestorName = gen;
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add a certificate to an OCSP request */
|
/* Add a certificate to an OCSP request */
|
||||||
|
|
Loading…
Reference in New Issue