diff options
author | bcook <> | 2016-01-18 16:15:14 +0000 |
---|---|---|
committer | bcook <> | 2016-01-18 16:15:14 +0000 |
commit | fa928897a647079070fabeb224bd9500f1d8d4fc (patch) | |
tree | dfa12e3bc6f5963f4437704042efaf7138ee7438 /src/lib | |
parent | 9fab5fb01ddbd59e5aa97edb223fd1e132231682 (diff) | |
download | openbsd-fa928897a647079070fabeb224bd9500f1d8d4fc.tar.gz openbsd-fa928897a647079070fabeb224bd9500f1d8d4fc.tar.bz2 openbsd-fa928897a647079070fabeb224bd9500f1d8d4fc.zip |
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 'src/lib')
-rw-r--r-- | src/lib/libtls/tls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c index 0a7c958369..5ca555027f 100644 --- a/src/lib/libtls/tls.c +++ b/src/lib/libtls/tls.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls.c,v 1.34 2015/10/07 23:25:45 beck Exp $ */ | 1 | /* $OpenBSD: tls.c,v 1.35 2016/01/18 16:15:14 bcook Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -44,6 +44,9 @@ tls_init(void) | |||
44 | SSL_load_error_strings(); | 44 | SSL_load_error_strings(); |
45 | SSL_library_init(); | 45 | SSL_library_init(); |
46 | 46 | ||
47 | if (BIO_sock_init() != 1) | ||
48 | return (-1); | ||
49 | |||
47 | if ((tls_config_default = tls_config_new()) == NULL) | 50 | if ((tls_config_default = tls_config_new()) == NULL) |
48 | return (-1); | 51 | return (-1); |
49 | 52 | ||