]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Display an error message when SSL_shutdown() return -1
authorAlain Spineux <alain@baculasystems.com>
Mon, 14 Nov 2022 18:17:08 +0000 (19:17 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:02 +0000 (13:57 +0200)
- only 0 and the SSL_shutdown() retry is handled

bacula/src/lib/tls.c

index 120c2b43d1b2e6378e0ce46b87052a748583d1cb..78211110713fa386eb7346116a50b03272454f88 100644 (file)
@@ -833,7 +833,8 @@ int tls_bsock_shutdown(BSOCKCORE *bsock)
       tid = start_bsock_timer(bsock, 60 * 2);
       err = SSL_shutdown(bsock->tls->openssl);
       stop_bsock_timer(tid);
-
+   }
+   if (err == -1) {
       switch (SSL_get_error(bsock->tls->openssl, err)) {
          case SSL_ERROR_NONE:
             break;