diff options
author | 2016-05-27 14:38:40 +0000 | |
---|---|---|
committer | 2016-05-27 14:38:40 +0000 | |
commit | f8289792d34ebff3761134f04d85da36be84ab94 (patch) | |
tree | dc52e4905e127062a85aef956d6adc2c1948cec0 /lib/libtls/tls_internal.h | |
parent | Avoid leaking ca_mem when freeing a tls_config. (diff) | |
download | wireguard-openbsd-f8289792d34ebff3761134f04d85da36be84ab94.tar.xz wireguard-openbsd-f8289792d34ebff3761134f04d85da36be84ab94.zip |
Rename some of the internal error setting functions to more closely follow
existing naming standards. Also provide functions for setting a struct
tls_error * directly (rather than having to have a struct tls * or a
struct tls_config *).
Diffstat (limited to 'lib/libtls/tls_internal.h')
-rw-r--r-- | lib/libtls/tls_internal.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libtls/tls_internal.h b/lib/libtls/tls_internal.h index cb5d90f5427..745fb40c763 100644 --- a/lib/libtls/tls_internal.h +++ b/lib/libtls/tls_internal.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_internal.h,v 1.28 2016/04/28 17:05:59 jsing Exp $ */ +/* $OpenBSD: tls_internal.h,v 1.29 2016/05/27 14:38:40 jsing Exp $ */ /* * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> @@ -118,10 +118,16 @@ int tls_handshake_client(struct tls *ctx); int tls_handshake_server(struct tls *ctx); int tls_host_port(const char *hostport, char **host, char **port); -int tls_set_config_error(struct tls_config *cfg, const char *fmt, ...) +int tls_error_set(struct tls_error *error, const char *fmt, ...) __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); -int tls_set_config_errorx(struct tls_config *cfg, const char *fmt, ...) +int tls_error_setx(struct tls_error *error, const char *fmt, ...) + __attribute__((__format__ (printf, 2, 3))) + __attribute__((__nonnull__ (2))); +int tls_config_set_error(struct tls_config *cfg, const char *fmt, ...) + __attribute__((__format__ (printf, 2, 3))) + __attribute__((__nonnull__ (2))); +int tls_config_set_errorx(struct tls_config *cfg, const char *fmt, ...) __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); int tls_set_error(struct tls *ctx, const char *fmt, ...) |