08738d25155386a9d5eda001f05fbaba219f91d8
[openssl.git] / doc / crypto / OCSP_response_status.pod
1 =pod
2
3 =head1 NAME
4
5 OCSP_response_status, OCSP_response_get1_basic, OCSP_response_create,
6 OCSP_RESPONSE_free - OCSP response functions
7
8 =head1 SYNOPSIS
9
10  #include <openssl/ocsp.h>
11
12  int OCSP_response_status(OCSP_RESPONSE *resp);
13  OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
14  OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
15  void OCSP_RESPONSE_free(OCSP_RESPONSE *resp);
16
17 =head1 DESCRIPTION
18
19 OCSP_response_status() returns the OCSP response status of B<resp>. It returns
20 one of the values: B<OCSP_RESPONSE_STATUS_SUCCESSFUL>,
21 B<OCSP_RESPONSE_STATUS_MALFORMEDREQUEST>,
22 B<OCSP_RESPONSE_STATUS_INTERNALERROR>, B<OCSP_RESPONSE_STATUS_TRYLATER>
23 B<OCSP_RESPONSE_STATUS_SIGREQUIRED>, or B<OCSP_RESPONSE_STATUS_UNAUTHORIZED>.
24
25 OCSP_response_get1_basic() decodes and returns the B<OCSP_BASICRESP> structure
26 contained in B<resp>.
27
28 OCSP_response_create() creates and returns an B<OCSP_RESPONSE> structure for
29 B<status> and optionally including basic response B<bs>.
30
31 OCSP_RESPONSE_free() frees up OCSP response B<resp>.
32
33 =head1 RETURN VALUES
34
35 OCSP_RESPONSE_status() returns a status value.
36
37 OCSP_response_get1_basic() returns an B<OCSP_BASICRESP> structure pointer or
38 B<NULL> if an error occurred.
39
40 OCSP_response_create() returns an B<OCSP_RESPONSE> structure pointer or B<NULL>
41 if an error occurred.
42
43 OCSP_RESPONSE_free() does not return a value.
44
45 =head1 NOTES
46
47 OCSP_response_get1_basic() is only called if the status of a response is
48 B<OCSP_RESPONSE_STATUS_SUCCESSFUL>.
49
50 =head1 SEE ALSO
51
52 L<crypto(3)>
53 L<OCSP_cert_to_id(3)>
54 L<OCSP_request_add1_nonce(3)>
55 L<OCSP_REQUEST_new(3)>
56 L<OCSP_response_find_status(3)>
57 L<OCSP_sendreq_new(3)>
58
59 =head1 COPYRIGHT
60
61 Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
62
63 Licensed under the OpenSSL license (the "License").  You may not use
64 this file except in compliance with the License.  You can obtain a copy
65 in the file LICENSE in the source distribution or at
66 L<https://www.openssl.org/source/license.html>.
67
68 =cut