1OCSP_RESPONSE_STATUS(3)             OpenSSL            OCSP_RESPONSE_STATUS(3)
2
3
4

NAME

6       OCSP_response_status, OCSP_response_get1_basic, OCSP_response_create,
7       OCSP_RESPONSE_free, OCSP_RESPID_set_by_name, OCSP_RESPID_set_by_key,
8       OCSP_RESPID_match, OCSP_basic_sign, OCSP_basic_sign_ctx - OCSP response
9       functions
10

SYNOPSIS

12        #include <openssl/ocsp.h>
13
14        int OCSP_response_status(OCSP_RESPONSE *resp);
15        OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
16        OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
17        void OCSP_RESPONSE_free(OCSP_RESPONSE *resp);
18
19        int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
20        int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
21        int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
22
23        int OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key,
24                            const EVP_MD *dgst, STACK_OF(X509) *certs,
25                            unsigned long flags);
26        int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp, X509 *signer, EVP_MD_CTX *ctx,
27                                STACK_OF(X509) *certs, unsigned long flags);
28

DESCRIPTION

30       OCSP_response_status() returns the OCSP response status of resp. It
31       returns one of the values: OCSP_RESPONSE_STATUS_SUCCESSFUL,
32       OCSP_RESPONSE_STATUS_MALFORMEDREQUEST,
33       OCSP_RESPONSE_STATUS_INTERNALERROR, OCSP_RESPONSE_STATUS_TRYLATER
34       OCSP_RESPONSE_STATUS_SIGREQUIRED, or OCSP_RESPONSE_STATUS_UNAUTHORIZED.
35
36       OCSP_response_get1_basic() decodes and returns the OCSP_BASICRESP
37       structure contained in resp.
38
39       OCSP_response_create() creates and returns an OCSP_RESPONSE structure
40       for status and optionally including basic response bs.
41
42       OCSP_RESPONSE_free() frees up OCSP response resp.
43
44       OCSP_RESPID_set_by_name() sets the name of the OCSP_RESPID to be the
45       same as the subject name in the supplied X509 certificate cert for the
46       OCSP responder.
47
48       OCSP_RESPID_set_by_key() sets the key of the OCSP_RESPID to be the same
49       as the key in the supplied X509 certificate cert for the OCSP
50       responder. The key is stored as a SHA1 hash.
51
52       Note that an OCSP_RESPID can only have one of the name, or the key set.
53       Calling OCSP_RESPID_set_by_name() or OCSP_RESPID_set_by_key() will
54       clear any existing setting.
55
56       OCSP_RESPID_match() tests whether the OCSP_RESPID given in respid
57       matches with the X509 certificate cert.
58
59       OCSP_basic_sign() signs OCSP response brsp using certificate signer,
60       private key key, digest dgst and additional certificates certs. If the
61       flags option OCSP_NOCERTS is set then no certificates will be included
62       in the response. If the flags option OCSP_RESPID_KEY is set then the
63       responder is identified by key ID rather than by name.
64       OCSP_basic_sign_ctx() also signs OCSP response brsp but uses the
65       parameters contained in digest context ctx.
66

RETURN VALUES

68       OCSP_RESPONSE_status() returns a status value.
69
70       OCSP_response_get1_basic() returns an OCSP_BASICRESP structure pointer
71       or NULL if an error occurred.
72
73       OCSP_response_create() returns an OCSP_RESPONSE structure pointer or
74       NULL if an error occurred.
75
76       OCSP_RESPONSE_free() does not return a value.
77
78       OCSP_RESPID_set_by_name(), OCSP_RESPID_set_by_key(), OCSP_basic_sign(),
79       and OCSP_basic_sign_ctx() return 1 on success or 0 on failure.
80
81       OCSP_RESPID_match() returns 1 if the OCSP_RESPID and the X509
82       certificate match or 0 otherwise.
83

NOTES

85       OCSP_response_get1_basic() is only called if the status of a response
86       is OCSP_RESPONSE_STATUS_SUCCESSFUL.
87

SEE ALSO

89       crypto(7) OCSP_cert_to_id(3) OCSP_request_add1_nonce(3)
90       OCSP_REQUEST_new(3) OCSP_resp_find_status(3) OCSP_sendreq_new(3)
91       OCSP_RESPID_new(3) OCSP_RESPID_free(3)
92

HISTORY

94       The OCSP_RESPID_set_by_name(), OCSP_RESPID_set_by_key() and
95       OCSP_RESPID_match() functions were added in OpenSSL 1.1.0a.
96
97       The OCSP_basic_sign_ctx() function was added in OpenSSL 1.1.1.
98
100       Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
101
102       Licensed under the OpenSSL license (the "License").  You may not use
103       this file except in compliance with the License.  You can obtain a copy
104       in the file LICENSE in the source distribution or at
105       <https://www.openssl.org/source/license.html>.
106
107
108
1091.1.1q                            2022-07-21           OCSP_RESPONSE_STATUS(3)
Impressum