| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_certificate_set_ocsp_status_request_file} (gnutls_certificate_credentials_t @var{sc}, const char * @var{response_file}, unsigned @var{idx}) |
| 6 |
@var{sc}: is a credentials structure. |
| 7 |
|
| 8 |
@var{response_file}: a filename of the OCSP response |
| 9 |
|
| 10 |
@var{idx}: is a certificate index as returned by @code{gnutls_certificate_set_key()} and friends |
| 11 |
|
| 12 |
This function loads the provided OCSP response. It will be |
| 13 |
sent to the client if requests an OCSP certificate status for |
| 14 |
the certificate chain specified by @code{idx} . |
| 15 |
|
| 16 |
@strong{Note:} the ability to set multiple OCSP responses per credential |
| 17 |
structure via the index @code{idx} was added in version 3.5.6. To keep |
| 18 |
backwards compatibility, it requires using @code{gnutls_certificate_set_flags()} |
| 19 |
with the @code{GNUTLS_CERTIFICATE_API_V2} flag to make the set certificate |
| 20 |
functions return an index usable by this function. |
| 21 |
|
| 22 |
This function can be called multiple times since GnuTLS 3.6.3 |
| 23 |
when multiple responses which apply to the chain are available. |
| 24 |
If the response provided does not match any certificates present |
| 25 |
in the chain, the code @code{GNUTLS_E_OCSP_MISMATCH_WITH_CERTS} is returned. |
| 26 |
To revert to the previous behavior set the flag @code{GNUTLS_CERTIFICATE_SKIP_OCSP_RESPONSE_CHECK} |
| 27 |
in the certificate credentials structure. In that case, only the |
| 28 |
end-certificate's OCSP response can be set. |
| 29 |
If the response is already expired at the time of loading the code |
| 30 |
@code{GNUTLS_E_EXPIRED} is returned. |
| 31 |
|
| 32 |
To revert to the previous behavior of this function which does not return |
| 33 |
any errors, set the flag @code{GNUTLS_CERTIFICATE_SKIP_OCSP_RESPONSE_CHECK} |
| 34 |
|
| 35 |
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, |
| 36 |
otherwise a negative error code is returned. |
| 37 |
|
| 38 |
@strong{Since:} 3.1.3 |
| 39 |
@end deftypefun |