gnutls_certificate_set_ocsp_status_request_file2: wrong success return value documentaion
Description of problem:
gnutls_certificate_set_ocsp_status_request_file2() is documented as returning 0 on success. It actually returns the number of responses loaded (from calling gnutls_certificate_set_ocsp_status_request_mem() (eg. 1) on success.
Version of gnutls used:
On test: 3.6.8 Looking at docs: 3.6.9 Looking at sourcecode: 4416da13
Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
Fedora
How reproducible:
Only tried once.
Steps to Reproduce:
if ((rc = gnutls_certificate_set_ocsp_status_request_file2(
state->x509_cred, CCS ofile, gnutls_cert_index,
GNUTLS_X509_FMT_DER)))
{
debug_printf("rc = %d\n", rc); return tls_error_gnu( US"gnutls_certificate_set_ocsp_status_request_file2", rc, host, errstr); }
Actual results:
23:28:48 4883 TLS: cert/key 0 /home/jgh/git/exim/test/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem registered 23:28:48 4883 OCSP response file = /home/jgh/git/exim/test/aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.ocsp.good.resp 23:28:48 4883 GnuTLS<3>: ASSERT: ocsp.c[gnutls_ocsp_resp_get_single]:1650 23:28:48 4883 GnuTLS<2>: associating OCSP response with chain 0 on pos 0 23:28:48 4883 rc = 1 23:28:48 4883 LOG: MAIN 23:28:48 4883 TLS error on connection from localhost (server1.example.com) [127.0.0.1] (gnutls_certificate_set_ocsp_status_request_file2): (unknown error code)
Expected results:
Documentation matches library code