| 777 | } md_ocsp_todo_ctx_t; |
| 778 | |
| 779 | static apr_status_t ocsp_req_make(OCSP_REQUEST **pocsp_req, OCSP_CERTID *certid) |
| 780 | { |
| 781 | OCSP_REQUEST *req = NULL; |
| 782 | OCSP_CERTID *id_copy = NULL; |
| 783 | apr_status_t rv = APR_ENOMEM; |
| 784 | |
| 785 | req = OCSP_REQUEST_new(); |
| 786 | if (!req) goto cleanup; |
| 787 | id_copy = OCSP_CERTID_dup(certid); |
| 788 | if (!id_copy) goto cleanup; |
| 789 | if (!OCSP_request_add0_id(req, id_copy)) goto cleanup; |
| 790 | id_copy = NULL; |
| 791 | OCSP_request_add1_nonce(req, 0, -1); |
| 792 | rv = APR_SUCCESS; |
| 793 | cleanup: |
| 794 | if (id_copy) OCSP_CERTID_free(id_copy); |
| 795 | if (APR_SUCCESS != rv && req) { |
| 796 | OCSP_REQUEST_free(req); |
| 797 | req = NULL; |
| 798 | } |
| 799 | *pocsp_req = req; |
| 800 | return rv; |
| 801 | } |
| 802 | |
| 803 | static apr_status_t ocsp_req_assign_der(md_data_t *d, OCSP_REQUEST *ocsp_req) |
| 804 | { |