]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls-serv: print the right error code on OCSP request setting
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 18 Oct 2017 08:18:33 +0000 (10:18 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 18 Oct 2017 13:53:26 +0000 (15:53 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
src/serv.c

index c6c2e18bf8a2590ec897cc9b2b4673dd9a15cbb9..0387a5a90a8c7c2f627292ac2fb940b27f0eb963 100644 (file)
@@ -1114,8 +1114,9 @@ int main(int argc, char **argv)
 
        /* OCSP status-request TLS extension */
        if (status_response_ocsp) {
-               if (gnutls_certificate_set_ocsp_status_request_file
-                   (cert_cred, status_response_ocsp, 0) < 0) {
+               ret = gnutls_certificate_set_ocsp_status_request_file
+                   (cert_cred, status_response_ocsp, 0);
+               if (ret < 0) {
                        fprintf(stderr,
                                "Cannot set OCSP status request file: %s\n",
                                gnutls_strerror(ret));