From e5afdf5a3b8757e4198aaceb006a5149cf321670 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Tue, 8 Sep 2015 15:29:35 +0000 Subject: Remove the default HTTPS port from tls_connect() - this is a TLS library, not a HTTPS library. ok beck@ --- lib/libtls/tls_client.c | 8 +++++--- lib/libtls/tls_internal.h | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libtls/tls_client.c b/lib/libtls/tls_client.c index 168a7089fca..55fb49ff782 100644 --- a/lib/libtls/tls_client.c +++ b/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/lib/libtls/tls_internal.h b/lib/libtls/tls_internal.h index 4503c20ab7e..d767c374941 100644 --- a/lib/libtls/tls_internal.h +++ b/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