From 7e148f977119e2cb2058b9cf3eeb192afd550b41 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Tue, 8 Sep 2015 15:29:34 +0000 Subject: Remove the default HTTPS port from tls_connect() - this is a TLS library, not a HTTPS library. ok beck@ --- src/lib/libtls/tls_client.c | 8 +++++--- src/lib/libtls/tls_internal.h | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c index 168a7089fc..55fb49ff78 100644 --- a/src/lib/libtls/tls_client.c +++ b/src/lib/libtls/tls_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_client.c,v 1.21 2015/08/27 15:26:50 jsing Exp $ */ +/* $OpenBSD: tls_client.c,v 1.22 2015/09/08 15:29:34 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -114,8 +114,10 @@ tls_connect_servername(struct tls *ctx, const char *host, const char *port, tls_set_errorx(ctx, "memory allocation failure"); goto err; } - if (ret != 0) - port = HTTPS_PORT; + if (ret != 0) { + tls_set_errorx(ctx, "no port provided"); + goto err; + } } h = (hs != NULL) ? hs : host; diff --git a/src/lib/libtls/tls_internal.h b/src/lib/libtls/tls_internal.h index 4503c20ab7..d767c37494 100644 --- a/src/lib/libtls/tls_internal.h +++ b/src/lib/libtls/tls_internal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_internal.h,v 1.14 2015/08/27 15:26:50 jsing Exp $ */ +/* $OpenBSD: tls_internal.h,v 1.15 2015/09/08 15:29:34 jsing Exp $ */ /* * Copyright (c) 2014 Jeremie Courreges-Anglas * Copyright (c) 2014 Joel Sing @@ -21,8 +21,6 @@ #include -#define HTTPS_PORT "443" - #define _PATH_SSL_CA_FILE "/etc/ssl/cert.pem" #define TLS_CIPHERS_COMPAT "ALL:!aNULL:!eNULL" -- cgit v1.2.3-55-g6feb