diff options
Diffstat (limited to 'src/lib/libtls/tls_internal.h')
-rw-r--r-- | src/lib/libtls/tls_internal.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/lib/libtls/tls_internal.h b/src/lib/libtls/tls_internal.h index c06e8218f6..5ff48ed7c9 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.84 2024/03/26 00:50:22 joshua Exp $ */ | 1 | /* $OpenBSD: tls_internal.h,v 1.85 2024/03/26 06:24:52 joshua 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> |
@@ -46,6 +46,7 @@ union tls_addr { | |||
46 | 46 | ||
47 | struct tls_error { | 47 | struct tls_error { |
48 | char *msg; | 48 | char *msg; |
49 | int code; | ||
49 | int errno_value; | 50 | int errno_value; |
50 | int tls; | 51 | int tls; |
51 | }; | 52 | }; |
@@ -258,27 +259,27 @@ int tls_set_cbs(struct tls *ctx, | |||
258 | tls_read_cb read_cb, tls_write_cb write_cb, void *cb_arg); | 259 | tls_read_cb read_cb, tls_write_cb write_cb, void *cb_arg); |
259 | 260 | ||
260 | void tls_error_clear(struct tls_error *error); | 261 | void tls_error_clear(struct tls_error *error); |
261 | int tls_error_set(struct tls_error *error, const char *fmt, ...) | 262 | int tls_error_set(struct tls_error *error, int code, const char *fmt, ...) |
262 | __attribute__((__format__ (printf, 2, 3))) | 263 | __attribute__((__format__ (printf, 3, 4))) |
263 | __attribute__((__nonnull__ (2))); | 264 | __attribute__((__nonnull__ (3))); |
264 | int tls_error_setx(struct tls_error *error, const char *fmt, ...) | 265 | int tls_error_setx(struct tls_error *error, int code, const char *fmt, ...) |
265 | __attribute__((__format__ (printf, 2, 3))) | 266 | __attribute__((__format__ (printf, 3, 4))) |
266 | __attribute__((__nonnull__ (2))); | 267 | __attribute__((__nonnull__ (3))); |
267 | int tls_config_set_error(struct tls_config *cfg, const char *fmt, ...) | 268 | int tls_config_set_error(struct tls_config *cfg, int code, const char *fmt, ...) |
268 | __attribute__((__format__ (printf, 2, 3))) | 269 | __attribute__((__format__ (printf, 3, 4))) |
269 | __attribute__((__nonnull__ (2))); | 270 | __attribute__((__nonnull__ (3))); |
270 | int tls_config_set_errorx(struct tls_config *cfg, const char *fmt, ...) | 271 | int tls_config_set_errorx(struct tls_config *cfg, int code, const char *fmt, ...) |
271 | __attribute__((__format__ (printf, 2, 3))) | 272 | __attribute__((__format__ (printf, 3, 4))) |
272 | __attribute__((__nonnull__ (2))); | 273 | __attribute__((__nonnull__ (3))); |
273 | int tls_set_error(struct tls *ctx, const char *fmt, ...) | 274 | int tls_set_error(struct tls *ctx, int code, const char *fmt, ...) |
274 | __attribute__((__format__ (printf, 2, 3))) | 275 | __attribute__((__format__ (printf, 3, 4))) |
275 | __attribute__((__nonnull__ (2))); | 276 | __attribute__((__nonnull__ (3))); |
276 | int tls_set_errorx(struct tls *ctx, const char *fmt, ...) | 277 | int tls_set_errorx(struct tls *ctx, int code, const char *fmt, ...) |
277 | __attribute__((__format__ (printf, 2, 3))) | 278 | __attribute__((__format__ (printf, 3, 4))) |
278 | __attribute__((__nonnull__ (2))); | 279 | __attribute__((__nonnull__ (3))); |
279 | int tls_set_ssl_errorx(struct tls *ctx, const char *fmt, ...) | 280 | int tls_set_ssl_errorx(struct tls *ctx, int code, const char *fmt, ...) |
280 | __attribute__((__format__ (printf, 2, 3))) | 281 | __attribute__((__format__ (printf, 3, 4))) |
281 | __attribute__((__nonnull__ (2))); | 282 | __attribute__((__nonnull__ (3))); |
282 | 283 | ||
283 | int tls_ssl_error(struct tls *ctx, SSL *ssl_conn, int ssl_ret, | 284 | int tls_ssl_error(struct tls *ctx, SSL *ssl_conn, int ssl_ret, |
284 | const char *prefix); | 285 | const char *prefix); |