



@deftypefun {int} {gnutls_certificate_set_ocsp_status_request_file} (gnutls_certificate_credentials_t @var{sc}, const char * @var{response_file}, unsigned @var{idx})
@var{sc}: is a credentials structure.

@var{response_file}: a filename of the OCSP response

@var{idx}: is a certificate index as returned by @code{gnutls_certificate_set_key()}  and friends

This function sets the filename of an OCSP response, that will be
sent to the client if requests an OCSP certificate status for
the certificate chain specified by  @code{idx} .

This is a convenience function which may be inefficient on busy servers since
the file is opened on every access. Use 
@code{gnutls_certificate_set_ocsp_status_request_function2()}  to fine-tune
file accesses.

@strong{Note:} the ability to set multiple OCSP responses per credential
structure via the index  @code{idx} was added in version 3.5.6. To keep
backwards compatibility, it requires using @code{gnutls_certificate_set_flags()} 
with the @code{GNUTLS_CERTIFICATE_API_V2}  flag to make the set certificate
functions return an index usable by this function.

@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned,
otherwise a negative error code is returned.

@strong{Since:} 3.1.3
@end deftypefun
