diff options
Diffstat (limited to 'src/lib/libtls/tls_config.c')
-rw-r--r-- | src/lib/libtls/tls_config.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c index 2dab4fc7d8..02f2b3c6e9 100644 --- a/src/lib/libtls/tls_config.c +++ b/src/lib/libtls/tls_config.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_config.c,v 1.49 2018/02/10 04:57:35 jsing Exp $ */ | 1 | /* $OpenBSD: tls_config.c,v 1.50 2018/03/19 16:34:47 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -77,7 +77,7 @@ tls_config_load_file(struct tls_error *error, const char *filetype, | |||
77 | } | 77 | } |
78 | 78 | ||
79 | struct tls_config * | 79 | struct tls_config * |
80 | tls_config_new(void) | 80 | tls_config_new_internal(void) |
81 | { | 81 | { |
82 | struct tls_config *config; | 82 | struct tls_config *config; |
83 | unsigned char sid[TLS_MAX_SESSION_ID_LENGTH]; | 83 | unsigned char sid[TLS_MAX_SESSION_ID_LENGTH]; |
@@ -128,6 +128,15 @@ tls_config_new(void) | |||
128 | return (NULL); | 128 | return (NULL); |
129 | } | 129 | } |
130 | 130 | ||
131 | struct tls_config * | ||
132 | tls_config_new(void) | ||
133 | { | ||
134 | if (tls_init() == -1) | ||
135 | return (NULL); | ||
136 | |||
137 | return tls_config_new_internal(); | ||
138 | } | ||
139 | |||
131 | void | 140 | void |
132 | tls_config_free(struct tls_config *config) | 141 | tls_config_free(struct tls_config *config) |
133 | { | 142 | { |