summary refs log tree commit diff
path: root/tls_server.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-10-14 21:28:19 -0400
committerJune McEnroe <june@causal.agency>2021-10-14 21:28:19 -0400
commit9993c88024f45401d84bfa7267620aa97328c1d0 (patch)
tree34097d0fd1f5d289f9fbc812a3cb5e3dc5afbc83 /tls_server.c
parentMerge LibreSSL 3.3.4 (diff)
parentImport LibreSSL 3.4.1 (diff)
downloadlibretls-3.4.1.tar.gz
libretls-3.4.1.zip
Merge LibreSSL 3.4.1 3.4.1
Diffstat (limited to '')
-rw-r--r--tls_server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tls_server.c b/tls_server.c
index 98a8389..831255a 100644
--- a/tls_server.c
+++ b/tls_server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_server.c,v 1.45 2019/05/13 22:36:01 bcook Exp $ */
+/* $OpenBSD: tls_server.c,v 1.47 2021/06/14 03:53:59 tb Exp $ */
 /*
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
  *
@@ -110,7 +110,7 @@ tls_servername_cb(SSL *ssl, int *al, void *arg)
             inet_pton(AF_INET6, name, &addrbuf) == 1)
 		return (SSL_TLSEXT_ERR_NOACK);
 
-	free((char *)conn_ctx->servername);
+	free(conn_ctx->servername);
 	if ((conn_ctx->servername = strdup(name)) == NULL)
 		goto err;
 
@@ -134,7 +134,7 @@ tls_servername_cb(SSL *ssl, int *al, void *arg)
 	 * There is no way to tell libssl that an internal failure occurred.
 	 * The only option we have is to return a fatal alert.
 	 */
-	*al = TLS1_AD_INTERNAL_ERROR;
+	*al = SSL_AD_INTERNAL_ERROR;
 	return (SSL_TLSEXT_ERR_ALERT_FATAL);
 }