Simply ignore errors from tls_close(). ftp(1) does the same and it seems
authorclaudio <claudio@openbsd.org>
Thu, 4 Mar 2021 14:00:26 +0000 (14:00 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 4 Mar 2021 14:00:26 +0000 (14:00 +0000)
too many servers out there fail to properly close the TLS session which
results in unneccessary warnings like
  TLS close: EOF without close notify
Result of a discussion with job@ and tb@

usr.sbin/rpki-client/http.c

index cb2d9dc..0e84c0b 100644 (file)
@@ -1,4 +1,4 @@
-/*      $OpenBSD: http.c,v 1.1 2021/03/04 13:01:41 claudio Exp $  */
+/*      $OpenBSD: http.c,v 1.2 2021/03/04 14:00:26 claudio Exp $  */
 /*
  * Copyright (c) 2020 Nils Fisher <nils_fisher@hotmail.com>
  * Copyright (c) 2020 Claudio Jeker <claudio@openbsd.com>
@@ -328,11 +328,8 @@ http_close(struct http_connection *conn)
                case TLS_WANT_POLLOUT:
                        return WANT_POLLOUT;
                case 0:
-                       break;
                case -1:
-                       warnx("%s: TLS close: %s", http_info(conn->url),
-                           tls_error(conn->tls));
-                       return -1;
+                       break;
                }
        }