summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls.h
diff options
context:
space:
mode:
authorjsing <>2016-04-28 16:48:44 +0000
committerjsing <>2016-04-28 16:48:44 +0000
commit2666540eb58ec0e76b541248bed9d159e6a2ccea (patch)
tree2228658d31ed91575cce8bbc0cc1f0394cb96787 /src/lib/libtls/tls.h
parent8da506fe86ae4114f94c896522d4bf388c1bfded (diff)
downloadopenbsd-2666540eb58ec0e76b541248bed9d159e6a2ccea.tar.gz
openbsd-2666540eb58ec0e76b541248bed9d159e6a2ccea.tar.bz2
openbsd-2666540eb58ec0e76b541248bed9d159e6a2ccea.zip
Rework the error handling in libtls so that we can associate errors with
both configuration and contexts. This allows us to propagate errors that occur during configuration, rather than either just failing with no reason or delaying the failure until it can be propagated via the tls context. Also provide a tls_config_error() function for retrieving the last error from a tls_config *. ok bcook@
Diffstat (limited to 'src/lib/libtls/tls.h')
-rw-r--r--src/lib/libtls/tls.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.h b/src/lib/libtls/tls.h
index e5c31ed581..da229d1fee 100644
--- a/src/lib/libtls/tls.h
+++ b/src/lib/libtls/tls.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.h,v 1.26 2015/10/07 23:33:38 beck Exp $ */ 1/* $OpenBSD: tls.h,v 1.27 2016/04/28 16:48:44 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -46,6 +46,7 @@ struct tls_config;
46 46
47int tls_init(void); 47int tls_init(void);
48 48
49const char *tls_config_error(struct tls_config *_config);
49const char *tls_error(struct tls *_ctx); 50const char *tls_error(struct tls *_ctx);
50 51
51struct tls_config *tls_config_new(void); 52struct tls_config *tls_config_new(void);