From 0d62016eab9c94cf7e9178860d6d3857adf3bc52 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 11 Nov 2016 14:02:24 +0000 Subject: Change the return value of tls_config_set_protocols() and tls_config_set_verify_depth() from void to int. This makes them consistent with all other tls_config_set_* functions and will allow for call time validation to be implemented. Rides libtls major bump. ok beck@ --- src/lib/libtls/tls_config.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/lib/libtls/tls_config.c') diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c index 3ac674e597..5bc671fc99 100644 --- a/src/lib/libtls/tls_config.c +++ b/src/lib/libtls/tls_config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_config.c,v 1.32 2016/11/05 15:13:26 beck Exp $ */ +/* $OpenBSD: tls_config.c,v 1.33 2016/11/11 14:02:24 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing * @@ -194,8 +194,10 @@ tls_config_new(void) if (tls_config_set_ciphers(config, "secure") != 0) goto err; - tls_config_set_protocols(config, TLS_PROTOCOLS_DEFAULT); - tls_config_set_verify_depth(config, 6); + if (tls_config_set_protocols(config, TLS_PROTOCOLS_DEFAULT) != 0) + goto err; + if (tls_config_set_verify_depth(config, 6) != 0) + goto err; tls_config_prefer_ciphers_server(config); @@ -575,16 +577,20 @@ tls_config_set_keypair_mem(struct tls_config *config, const uint8_t *cert, return (0); } -void +int tls_config_set_protocols(struct tls_config *config, uint32_t protocols) { config->protocols = protocols; + + return (0); } -void +int tls_config_set_verify_depth(struct tls_config *config, int verify_depth) { config->verify_depth = verify_depth; + + return (0); } void -- cgit v1.2.3-55-g6feb