diff options
| author | June McEnroe <june@causal.agency> | 2026-06-01 14:42:49 -0400 |
|---|---|---|
| committer | June McEnroe <june@causal.agency> | 2026-06-01 14:42:49 -0400 |
| commit | d08958f5d2c4d71d8132ea5c6cb45e48b5c4d83d (patch) | |
| tree | 01f7eb5bc8d9d0e708ec077364a6b3fda7f1bdde /include/tls.h | |
| parent | Import LibreSSL 3.9.2 (diff) | |
| download | libretls-d08958f5d2c4d71d8132ea5c6cb45e48b5c4d83d.tar.gz libretls-d08958f5d2c4d71d8132ea5c6cb45e48b5c4d83d.zip | |
Import LibreSSL 4.0.0
Diffstat (limited to 'include/tls.h')
| -rw-r--r-- | include/tls.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/tls.h b/include/tls.h index 59b2c4c..26d5982 100644 --- a/include/tls.h +++ b/include/tls.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.h,v 1.63 2023/07/02 06:37:27 beck Exp $ */ +/* $OpenBSD: tls.h,v 1.67 2024/08/02 15:00:01 tb Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -40,8 +40,8 @@ typedef SSIZE_T ssize_t; * Deprecated versions of TLS. Using these effectively selects * the minimum supported version. */ -#define TLS_PROTOCOL_TLSv1_0 (1 << 3) -#define TLS_PROTOCOL_TLSv1_1 (1 << 3) +#define TLS_PROTOCOL_TLSv1_0 (1 << 1) +#define TLS_PROTOCOL_TLSv1_1 (1 << 2) /* Supported versions of TLS */ #define TLS_PROTOCOL_TLSv1_2 (1 << 3) #define TLS_PROTOCOL_TLSv1_3 (1 << 4) @@ -83,6 +83,14 @@ typedef SSIZE_T ssize_t; #define TLS_MAX_SESSION_ID_LENGTH 32 #define TLS_TICKET_KEY_SIZE 48 +/* Error codes */ +#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL) +#define TLS_ERROR_UNKNOWN 0x0000 +#define TLS_ERROR_OUT_OF_MEMORY 0x1000 +#define TLS_ERROR_INVALID_CONTEXT 0x2000 +#define TLS_ERROR_INVALID_ARGUMENT 0x2001 +#endif + struct tls; struct tls_config; @@ -95,6 +103,10 @@ int tls_init(void); const char *tls_config_error(struct tls_config *_config); const char *tls_error(struct tls *_ctx); +#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL) +int tls_config_error_code(struct tls_config *_config); +int tls_error_code(struct tls *_ctx); +#endif struct tls_config *tls_config_new(void); void tls_config_free(struct tls_config *_config); |