2014-06-21 19:13:37 +00:00
|
|
|
=pod
|
|
|
|
|
2016-05-21 18:49:33 +00:00
|
|
|
=head1 NAME
|
|
|
|
|
2014-06-21 19:13:37 +00:00
|
|
|
OCSP_response_status, OCSP_response_get1_basic, OCSP_response_create,
|
2016-09-12 16:39:55 +00:00
|
|
|
OCSP_RESPONSE_free, OCSP_RESPID_set_by_name,
|
2016-09-13 22:26:53 +00:00
|
|
|
OCSP_RESPID_set_by_key, OCSP_RESPID_match - OCSP response functions
|
2014-06-21 19:13:37 +00:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
#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);
|
|
|
|
|
2016-09-12 16:39:55 +00:00
|
|
|
int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
|
|
|
|
int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
|
2016-09-13 22:26:53 +00:00
|
|
|
int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
|
2016-09-12 16:39:55 +00:00
|
|
|
|
2014-06-21 19:13:37 +00:00
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
|
|
OCSP_response_status() returns the OCSP response status of B<resp>. It returns
|
|
|
|
one of the values: B<OCSP_RESPONSE_STATUS_SUCCESSFUL>,
|
|
|
|
B<OCSP_RESPONSE_STATUS_MALFORMEDREQUEST>,
|
|
|
|
B<OCSP_RESPONSE_STATUS_INTERNALERROR>, B<OCSP_RESPONSE_STATUS_TRYLATER>
|
|
|
|
B<OCSP_RESPONSE_STATUS_SIGREQUIRED>, or B<OCSP_RESPONSE_STATUS_UNAUTHORIZED>.
|
|
|
|
|
|
|
|
OCSP_response_get1_basic() decodes and returns the B<OCSP_BASICRESP> structure
|
2016-05-20 12:11:46 +00:00
|
|
|
contained in B<resp>.
|
2014-06-21 19:13:37 +00:00
|
|
|
|
|
|
|
OCSP_response_create() creates and returns an B<OCSP_RESPONSE> structure for
|
|
|
|
B<status> and optionally including basic response B<bs>.
|
|
|
|
|
2016-03-20 15:51:06 +00:00
|
|
|
OCSP_RESPONSE_free() frees up OCSP response B<resp>.
|
2014-06-21 19:13:37 +00:00
|
|
|
|
2016-09-12 16:39:55 +00:00
|
|
|
OCSP_RESPID_set_by_name() sets the name of the OCSP_RESPID to be the same as the
|
|
|
|
subject name in the supplied X509 certificate B<cert> for the OCSP responder.
|
|
|
|
|
|
|
|
OCSP_RESPID_set_by_key() sets the key of the OCSP_RESPID to be the same as the
|
|
|
|
key in the supplied X509 certificate B<cert> for the OCSP responder. The key is
|
|
|
|
stored as a SHA1 hash.
|
|
|
|
|
|
|
|
Note that an OCSP_RESPID can only have one of the name, or the key set. Calling
|
|
|
|
OCSP_RESPID_set_by_name() or OCSP_RESPID_set_by_key() will clear any existing
|
|
|
|
setting.
|
|
|
|
|
2016-09-13 22:26:53 +00:00
|
|
|
OCSP_RESPID_match() tests whether the OCSP_RESPID given in B<respid> matches
|
|
|
|
with the X509 certificate B<cert>.
|
|
|
|
|
2014-06-21 19:13:37 +00:00
|
|
|
=head1 RETURN VALUES
|
|
|
|
|
|
|
|
OCSP_RESPONSE_status() returns a status value.
|
|
|
|
|
|
|
|
OCSP_response_get1_basic() returns an B<OCSP_BASICRESP> structure pointer or
|
|
|
|
B<NULL> if an error occurred.
|
|
|
|
|
|
|
|
OCSP_response_create() returns an B<OCSP_RESPONSE> structure pointer or B<NULL>
|
|
|
|
if an error occurred.
|
|
|
|
|
|
|
|
OCSP_RESPONSE_free() does not return a value.
|
|
|
|
|
2016-09-12 16:39:55 +00:00
|
|
|
OCSP_RESPID_set_by_name() and OCSP_RESPID_set_by_key() return 1 on success or 0
|
|
|
|
on failure.
|
|
|
|
|
2016-09-13 22:26:53 +00:00
|
|
|
OCSP_RESPID_match() returns 1 if the OCSP_RESPID and the X509 certificate match
|
|
|
|
or 0 otherwise.
|
|
|
|
|
2014-06-21 19:13:37 +00:00
|
|
|
=head1 NOTES
|
|
|
|
|
|
|
|
OCSP_response_get1_basic() is only called if the status of a response is
|
|
|
|
B<OCSP_RESPONSE_STATUS_SUCCESSFUL>.
|
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
2015-08-17 19:21:33 +00:00
|
|
|
L<crypto(3)>
|
|
|
|
L<OCSP_cert_to_id(3)>
|
|
|
|
L<OCSP_request_add1_nonce(3)>
|
|
|
|
L<OCSP_REQUEST_new(3)>
|
|
|
|
L<OCSP_response_find_status(3)>
|
|
|
|
L<OCSP_sendreq_new(3)>
|
2016-09-12 16:39:55 +00:00
|
|
|
L<OCSP_RESPID_new(3)>
|
|
|
|
L<OCSP_RESPID_free(3)>
|
|
|
|
|
|
|
|
=head1 HISTORY
|
|
|
|
|
2016-09-13 22:26:53 +00:00
|
|
|
The OCSP_RESPID_set_by_name(), OCSP_RESPID_set_by_key() and OCSP_RESPID_match()
|
|
|
|
functions were added in OpenSSL version 1.1.0a.
|
2014-06-21 19:13:37 +00:00
|
|
|
|
2016-05-18 15:44:05 +00:00
|
|
|
=head1 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 LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|