summaryrefslogtreecommitdiffstats
path: root/lib/libtls/tls_config.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2015-02-11 06:46:33 +0000
committerjsing <jsing@openbsd.org>2015-02-11 06:46:33 +0000
commit0ca7b9df22835af5b39c6f6a3e6f720f452c1f39 (patch)
treefb576fc5877e7d60115a170c402a782d8dace1e9 /lib/libtls/tls_config.c
parentdont need lockmgr for pmap things, so we dont need sys/lock.h (diff)
downloadwireguard-openbsd-0ca7b9df22835af5b39c6f6a3e6f720f452c1f39.tar.xz
wireguard-openbsd-0ca7b9df22835af5b39c6f6a3e6f720f452c1f39.zip
Be consistent with naming - only use "host" and "hostname" when referring
to an actual host and use "servername" when referring to the name of the TLS server that we expect to be indentified in the server certificate. Likewise, rename verify_host to verify_name and use the term "name" throughout the verification code (rather than host or hostname). Requested by and ok tedu@
Diffstat (limited to 'lib/libtls/tls_config.c')
-rw-r--r--lib/libtls/tls_config.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libtls/tls_config.c b/lib/libtls/tls_config.c
index 7697fa6ee85..116cde8297e 100644
--- a/lib/libtls/tls_config.c
+++ b/lib/libtls/tls_config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_config.c,v 1.3 2015/02/07 06:19:26 jsing Exp $ */
+/* $OpenBSD: tls_config.c,v 1.4 2015/02/11 06:46:33 jsing Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
@@ -208,10 +208,11 @@ tls_config_set_verify_depth(struct tls_config *config, int verify_depth)
config->verify_depth = verify_depth;
}
+/* XXX - rename to noverifyname. */
void
tls_config_insecure_noverifyhost(struct tls_config *config)
{
- config->verify_host = 0;
+ config->verify_name = 0;
}
void
@@ -223,6 +224,6 @@ tls_config_insecure_noverifycert(struct tls_config *config)
void
tls_config_verify(struct tls_config *config)
{
- config->verify_host = 1;
config->verify_cert = 1;
+ config->verify_name = 1;
}