This commit is contained in:
David von Oheimb 2025-07-31 15:34:03 +02:00 committed by GitHub
commit 92ca422131
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 12 deletions

View File

@ -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 */