OCSP_request_onereq_get0 (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
OCSP_REQUEST_new, OCSP_REQUEST_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 *OCSP_REQUEST_new(void); void OCSP_REQUEST_free(OCSP_REQUEST *req); OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid); int OCSP_request_sign(OCSP_REQUEST *req, X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, STACK_OF(X509) *certs, unsigned long flags); int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert); int OCSP_request_onereq_count(OCSP_REQUEST *req); OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
DESCRIPTION
OCSP_REQUEST_new() allocates and returns an emptyOCSP_REQUEST_free() frees up the request structure req.
OCSP_request_add0_id() adds certificate
OCSP_request_sign() signs
OCSP_request_add1_cert() adds certificate cert to request req. The application is responsible for freeing up cert after use.
OCSP_request_onereq_count() returns the total number of
OCSP_request_onereq_get0() returns an internal pointer to the
RETURN VALUES
OCSP_REQUEST_new() returns an emptyOCSP_request_add0_id() returns the
OCSP_request_sign() and OCSP_request_add1_cert() return 1 for success and 0 for failure.
OCSP_request_onereq_count() returns the total number of
OCSP_request_onereq_get0() returns a pointer to an
NOTES
AnOCSP_request_onereq_count() and OCSP_request_onereq_get0() are mainly used by
EXAMPLE
Create an
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);
SEE ALSO
crypto(3), OCSP_cert_to_id(3), OCSP_request_add1_nonce(3), OCSP_response_find_status(3), OCSP_response_status(3), OCSP_sendreq_new(3)COPYRIGHT
Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.Licensed under the OpenSSL license (the ``License''). You may not use this file except in compliance with the License. You can obtain a copy in the file