summaryrefslogtreecommitdiff
path: root/src/lib/libtls/tls_internal.h
diff options
context:
space:
mode:
authorjsing <>2016-05-27 14:38:40 +0000
committerjsing <>2016-05-27 14:38:40 +0000
commit02efd2825938b0467533f9bd0feeb0f8e0443e74 (patch)
tree5b697221d95cc723019dc979f74af389ca3025be /src/lib/libtls/tls_internal.h
parent6c3d4fd7941ef049d641eaa523e53e1c2f97f2e4 (diff)
downloadopenbsd-02efd2825938b0467533f9bd0feeb0f8e0443e74.tar.gz
openbsd-02efd2825938b0467533f9bd0feeb0f8e0443e74.tar.bz2
openbsd-02efd2825938b0467533f9bd0feeb0f8e0443e74.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 '')
-rw-r--r--src/lib/libtls/tls_internal.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/libtls/tls_internal.h b/src/lib/libtls/tls_internal.h
index cb5d90f542..745fb40c76 100644
--- a/src/lib/libtls/tls_internal.h
+++ b/src/lib/libtls/tls_internal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_internal.h,v 1.28 2016/04/28 17:05:59 jsing Exp $ */ 1/* $OpenBSD: tls_internal.h,v 1.29 2016/05/27 14:38:40 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> 3 * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org>
4 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 4 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
@@ -118,10 +118,16 @@ int tls_handshake_client(struct tls *ctx);
118int tls_handshake_server(struct tls *ctx); 118int tls_handshake_server(struct tls *ctx);
119int tls_host_port(const char *hostport, char **host, char **port); 119int tls_host_port(const char *hostport, char **host, char **port);
120 120
121int tls_set_config_error(struct tls_config *cfg, const char *fmt, ...) 121int tls_error_set(struct tls_error *error, const char *fmt, ...)
122 __attribute__((__format__ (printf, 2, 3))) 122 __attribute__((__format__ (printf, 2, 3)))
123 __attribute__((__nonnull__ (2))); 123 __attribute__((__nonnull__ (2)));
124int tls_set_config_errorx(struct tls_config *cfg, const char *fmt, ...) 124int tls_error_setx(struct tls_error *error, const char *fmt, ...)
125 __attribute__((__format__ (printf, 2, 3)))
126 __attribute__((__nonnull__ (2)));
127int tls_config_set_error(struct tls_config *cfg, const char *fmt, ...)
128 __attribute__((__format__ (printf, 2, 3)))
129 __attribute__((__nonnull__ (2)));
130int tls_config_set_errorx(struct tls_config *cfg, const char *fmt, ...)
125 __attribute__((__format__ (printf, 2, 3))) 131 __attribute__((__format__ (printf, 2, 3)))
126 __attribute__((__nonnull__ (2))); 132 __attribute__((__nonnull__ (2)));
127int tls_set_error(struct tls *ctx, const char *fmt, ...) 133int tls_set_error(struct tls *ctx, const char *fmt, ...)