xref: /freebsd/secure/lib/libcrypto/man/man3/OCSP_response_status.3 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)

Standard preamble:
========================================================================
..
..
.. Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. \*(C+ will
give a nicer C++. Capital omega is used to do unbreakable dashes and
therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
nothing in troff, for use with C<>.
.tr \(*W- . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.

If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.

Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================

Title "OCSP_RESPONSE_STATUS 3ossl"
OCSP_RESPONSE_STATUS 3ossl "2023-09-19" "3.0.11" "OpenSSL"
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
"NAME"
OCSP_response_status, OCSP_response_get1_basic, OCSP_response_create, OCSP_RESPONSE_free, OCSP_RESPID_set_by_name, OCSP_RESPID_set_by_key_ex, OCSP_RESPID_set_by_key, OCSP_RESPID_match_ex, OCSP_RESPID_match, OCSP_basic_sign, OCSP_basic_sign_ctx \- OCSP response functions
"SYNOPSIS"
Header "SYNOPSIS" .Vb 1 #include <openssl/ocsp.h> \& int OCSP_response_status(OCSP_RESPONSE *resp); OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp); OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs); void OCSP_RESPONSE_free(OCSP_RESPONSE *resp); \& int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert); int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx, const char *propq); int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert); int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx, const char *propq); int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert); \& int OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, STACK_OF(X509) *certs, unsigned long flags); int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp, X509 *signer, EVP_MD_CTX *ctx, STACK_OF(X509) *certs, unsigned long flags); .Ve
"DESCRIPTION"
Header "DESCRIPTION" \fBOCSP_response_status() returns the \s-1OCSP\s0 response status of resp. It returns one of the values: \s-1OCSP_RESPONSE_STATUS_SUCCESSFUL\s0, \fI\s-1OCSP_RESPONSE_STATUS_MALFORMEDREQUEST\s0, \fI\s-1OCSP_RESPONSE_STATUS_INTERNALERROR\s0, \s-1OCSP_RESPONSE_STATUS_TRYLATER\s0 \fI\s-1OCSP_RESPONSE_STATUS_SIGREQUIRED\s0, or \s-1OCSP_RESPONSE_STATUS_UNAUTHORIZED\s0.

\fBOCSP_response_get1_basic() decodes and returns the \s-1OCSP_BASICRESP\s0 structure contained in resp.

\fBOCSP_response_create() creates and returns an \s-1OCSP_RESPONSE\s0 structure for \fIstatus and optionally including basic response bs.

\fBOCSP_RESPONSE_free() frees up \s-1OCSP\s0 response resp.

\fBOCSP_RESPID_set_by_name() sets the name of the \s-1OCSP_RESPID\s0 to be the same as the subject name in the supplied X509 certificate cert for the \s-1OCSP\s0 responder.

\fBOCSP_RESPID_set_by_key_ex() sets the key of the \s-1OCSP_RESPID\s0 to be the same as the key in the supplied X509 certificate cert for the \s-1OCSP\s0 responder. The key is stored as a \s-1SHA1\s0 hash. To calculate the hash the \s-1SHA1\s0 algorithm is fetched using the library ctx libctx and the property query string propq (see \*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in crypto\|(7) for further information).

\fBOCSP_RESPID_set_by_key() does the same as OCSP_RESPID_set_by_key_ex() except that the default library context is used with an empty property query string.

Note that an \s-1OCSP_RESPID\s0 can only have one of the name, or the key set. Calling \fBOCSP_RESPID_set_by_name() or OCSP_RESPID_set_by_key() will clear any existing setting.

\fBOCSP_RESPID_match_ex() tests whether the \s-1OCSP_RESPID\s0 given in respid matches with the X509 certificate cert based on the \s-1SHA1\s0 hash. To calculate the hash the \s-1SHA1\s0 algorithm is fetched using the library ctx libctx and the property query string propq (see \*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in crypto\|(7) for further information).

\fBOCSP_RESPID_match() does the same as OCSP_RESPID_match_ex() except that the default library context is used with an empty property query string.

\fBOCSP_basic_sign() signs \s-1OCSP\s0 response brsp using certificate signer, private key \fIkey, digest dgst and additional certificates certs. If the flags option \fI\s-1OCSP_NOCERTS\s0 is set then no certificates will be included in the response. If the \fIflags option \s-1OCSP_RESPID_KEY\s0 is set then the responder is identified by key \s-1ID\s0 rather than by name. OCSP_basic_sign_ctx() also signs \s-1OCSP\s0 response brsp but uses the parameters contained in digest context ctx.

"RETURN VALUES"
Header "RETURN VALUES" \fBOCSP_RESPONSE_status() returns a status value.

\fBOCSP_response_get1_basic() returns an \s-1OCSP_BASICRESP\s0 structure pointer or \fI\s-1NULL\s0 if an error occurred.

\fBOCSP_response_create() returns an \s-1OCSP_RESPONSE\s0 structure pointer or \s-1NULL\s0 if an error occurred.

\fBOCSP_RESPONSE_free() does not return a value.

\fBOCSP_RESPID_set_by_name(), OCSP_RESPID_set_by_key(), OCSP_basic_sign(), and \fBOCSP_basic_sign_ctx() return 1 on success or 0 on failure.

\fBOCSP_RESPID_match() returns 1 if the \s-1OCSP_RESPID\s0 and the X509 certificate match or 0 otherwise.

"NOTES"
Header "NOTES" \fBOCSP_response_get1_basic() is only called if the status of a response is \fI\s-1OCSP_RESPONSE_STATUS_SUCCESSFUL\s0.
"SEE ALSO"
Header "SEE ALSO" \fBcrypto\|(7) \fBOCSP_cert_to_id\|(3) \fBOCSP_request_add1_nonce\|(3) \fBOCSP_REQUEST_new\|(3) \fBOCSP_resp_find_status\|(3) \fBOCSP_sendreq_new\|(3) \fBOCSP_RESPID_new\|(3) \fBOCSP_RESPID_free\|(3)
"HISTORY"
Header "HISTORY" The OCSP_RESPID_set_by_name(), OCSP_RESPID_set_by_key() and OCSP_RESPID_match() functions were added in OpenSSL 1.1.0a.

The OCSP_basic_sign_ctx() function was added in OpenSSL 1.1.1.

"COPYRIGHT"
Header "COPYRIGHT" Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use this file except in compliance with the License. You can obtain a copy in the file \s-1LICENSE\s0 in the source distribution or at <https://www.openssl.org/source/license.html>.