[gnutls-devel] GnuTLS | gnutls_certificate_set_ocsp_status_request_file2: wrong success return value documentaion (#836)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Sep 18 00:43:44 CEST 2019



jgh created an issue: https://gitlab.com/gnutls/gnutls/issues/836



## 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: 4416da13f0975476d83452c9d6d093aec9ebb27e

## 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

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/issues/836
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190917/ec0c4f4c/attachment.html>


More information about the Gnutls-devel mailing list