From c7be23675a7e4a025b9e5a5375aaed6139e653db Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 19 Mar 2018 16:34:47 +0000 Subject: Automatically handle library initialisation for libtls. Now that we have tls_init() under pthread_once(), automatically initialise libtls from the entry point functions (tls_config(), tls_client() and tls_server()) - this makes an explicit tls_init() call no longer a requirement. ok bcook@ beck@ inoguchi@ --- src/lib/libtls/tls.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/lib/libtls/tls.c') diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c index e7a485bcec..467db164d5 100644 --- a/src/lib/libtls/tls.c +++ b/src/lib/libtls/tls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.c,v 1.78 2018/03/08 16:12:00 beck Exp $ */ +/* $OpenBSD: tls.c,v 1.79 2018/03/19 16:34:47 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -47,13 +47,12 @@ tls_do_init(void) if (BIO_sock_init() != 1) return; - if ((tls_config_default = tls_config_new()) == NULL) + if ((tls_config_default = tls_config_new_internal()) == NULL) return; tls_config_default->refcount++; tls_init_rv = 0; - return; } int -- cgit v1.2.3-55-g6feb