Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
OCSP_REQUEST_new, OCSP_REQUEST_free, OCSP_SIGNATURE_new, OCSP_SIGNATURE_free, OCSP_REQINFO_new, OCSP_REQINFO_free, OCSP_ONEREQ_new, OCSP_ONEREQ_free, OCSP_request_add0_id, OCSP_request_sign, OCSP_request_add1_cert, OCSP_request_onereq_count, OCSP_request_onereq_get0 — OCSP request functionsSYNOPSIS
#include <openssl/ocsp.h>OCSP_REQUEST_new(void);
OCSP_REQUEST_free(OCSP_REQUEST *req);
OCSP_SIGNATURE_new(void);
OCSP_SIGNATURE_free(OCSP_SIGNATURE *signature);
OCSP_REQINFO_new(void);
OCSP_REQINFO_free(OCSP_REQINFO *reqinfo);
OCSP_ONEREQ_new(void);
OCSP_ONEREQ_free(OCSP_ONEREQ *onereq);
OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);
OCSP_request_sign(OCSP_REQUEST *req, X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, STACK_OF(X509) *certs, unsigned long flags);
OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
OCSP_request_onereq_count(OCSP_REQUEST *req);
OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
DESCRIPTION
OCSP_REQUEST_new() allocates and initializes an empty OCSP_REQUEST object, representing an ASN.1 OCSPRequest structure defined in RFC 6960. OCSP_REQUEST_free() frees req.- 1
.RETURN VALUES
OCSP_REQUEST_new(), OCSP_SIGNATURE_new(), OCSP_REQINFO_new(), and OCSP_ONEREQ_new() return an empty OCSP_REQUEST, OCSP_SIGNATURE, OCSP_REQINFO, or OCSP_ONEREQ object, respectively, or NULL if an error occurred.EXAMPLES
Create an OCSP_REQUEST object for certificate cert with issuer issuer:OCSP_REQUEST *req; OCSP_ID *cid; req = OCSP_REQUEST_new(); if (req == NULL) /* error */ cid = OCSP_cert_to_id(EVP_sha1(), cert, issuer); if (cid == NULL) /* error */ if (OCSP_REQUEST_add0_id(req, cid) == NULL) /* error */ /* Do something with req, e.g. query responder */ OCSP_REQUEST_free(req);