diff options
author | 2014-12-07 15:48:02 +0000 | |
---|---|---|
committer | 2014-12-07 15:48:02 +0000 | |
commit | 31a3a711f2fbe8e417eca0e2bdbfc443ec2a72ff (patch) | |
tree | e5fdc0cda36e19fe0e102c29e0fc46cfdedd4d37 /lib/libtls/tls_client.c | |
parent | Revert to the use of C code for the basic BN routines (bn_add_words, (diff) | |
download | wireguard-openbsd-31a3a711f2fbe8e417eca0e2bdbfc443ec2a72ff.tar.xz wireguard-openbsd-31a3a711f2fbe8e417eca0e2bdbfc443ec2a72ff.zip |
revert previous change for now, adjusting based on comments from jsing@
Diffstat (limited to 'lib/libtls/tls_client.c')
-rw-r--r-- | lib/libtls/tls_client.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/libtls/tls_client.c b/lib/libtls/tls_client.c index c5849a6897c..b851a6ecd0e 100644 --- a/lib/libtls/tls_client.c +++ b/lib/libtls/tls_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_client.c,v 1.3 2014/12/07 15:00:32 bcook Exp $ */ +/* $OpenBSD: tls_client.c,v 1.4 2014/12/07 15:48:02 bcook Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -209,11 +209,9 @@ tls_connect_fds(struct tls *ctx, int fd_read, int fd_write, tls_set_error(ctx, "no server certificate"); goto err; } - tls_clear_error(ctx); - if (tls_check_hostname(ctx, cert, hostname) != 0) { - if (tls_error(ctx) == NULL) - tls_set_error(ctx, "host `%s' not present in" - " server certificate", hostname); + if (tls_check_hostname(cert, hostname) != 0) { + tls_set_error(ctx, "host `%s' not present in" + " server certificate", hostname); goto err; } } |