summaryrefslogtreecommitdiff
path: root/lib/libtls/tls.c
diff options
context:
space:
mode:
authorBrent Cook <bcook@cvs.openbsd.org>2016-01-18 16:15:15 +0000
committerBrent Cook <bcook@cvs.openbsd.org>2016-01-18 16:15:15 +0000
commit52025a8946b0010aca00c2765a6c4a22c8071278 (patch)
tree2b4ef63dc51606fdbaad336c97e055d449bd3cb4 /lib/libtls/tls.c
parentde48684be031ca3af4c5d897d5fda296213df76d (diff)
Call BIO_sock_init() from tls_init() to ensure sockets are enabled on Windows.
This is of course a no-op on other platforms. Noted by equalsraf from github.
Diffstat (limited to 'lib/libtls/tls.c')
-rw-r--r--lib/libtls/tls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libtls/tls.c b/lib/libtls/tls.c
index 0a7c9583699..5ca555027f2 100644
--- a/lib/libtls/tls.c
+++ b/lib/libtls/tls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls.c,v 1.34 2015/10/07 23:25:45 beck Exp $ */
+/* $OpenBSD: tls.c,v 1.35 2016/01/18 16:15:14 bcook Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
@@ -44,6 +44,9 @@ tls_init(void)
SSL_load_error_strings();
SSL_library_init();
+ if (BIO_sock_init() != 1)
+ return (-1);
+
if ((tls_config_default = tls_config_new()) == NULL)
return (-1);