summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libtls/tls_client.c')
-rw-r--r--src/lib/libtls/tls_client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c
index 2aca519f8b..047831e59f 100644
--- a/src/lib/libtls/tls_client.c
+++ b/src/lib/libtls/tls_client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_client.c,v 1.27 2015/09/11 12:56:55 beck Exp $ */ 1/* $OpenBSD: tls_client.c,v 1.28 2015/09/12 19:54:31 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -25,6 +25,7 @@
25#include <stdlib.h> 25#include <stdlib.h>
26#include <unistd.h> 26#include <unistd.h>
27 27
28#include <openssl/err.h>
28#include <openssl/x509.h> 29#include <openssl/x509.h>
29 30
30#include <tls.h> 31#include <tls.h>
@@ -251,6 +252,7 @@ tls_handshake_client(struct tls *ctx)
251 goto err; 252 goto err;
252 } 253 }
253 254
255 ERR_clear_error();
254 if ((ssl_ret = SSL_connect(ctx->ssl_conn)) != 1) { 256 if ((ssl_ret = SSL_connect(ctx->ssl_conn)) != 1) {
255 rv = tls_ssl_error(ctx, ctx->ssl_conn, ssl_ret, "handshake"); 257 rv = tls_ssl_error(ctx, ctx->ssl_conn, ssl_ret, "handshake");
256 goto err; 258 goto err;