summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_internal.h
diff options
context:
space:
mode:
authorjsing <>2019-01-21 13:45:57 +0000
committerjsing <>2019-01-21 13:45:57 +0000
commitc06f6f3e478fe1e9e0a1f1601f983e3d55479ed3 (patch)
tree14969b4304a48b9fdbf41d756aec5076c5ac5d69 /src/lib/libssl/tls13_internal.h
parentbde3ac13e78ee3960e9e0340d4af51a79ada0aa6 (diff)
downloadopenbsd-c06f6f3e478fe1e9e0a1f1601f983e3d55479ed3.tar.gz
openbsd-c06f6f3e478fe1e9e0a1f1601f983e3d55479ed3.tar.bz2
openbsd-c06f6f3e478fe1e9e0a1f1601f983e3d55479ed3.zip
Provide the initial TLSv1.3 client implementation.
Move tls13_connect() to a new tls13_client.c file and provide a legacy wrapper to it, which allocates a struct tls_ctx if necessary. Also move tls13_client_hello_send() to tls13_client.c and actual implement the building of a client hello. ok tb@
Diffstat (limited to 'src/lib/libssl/tls13_internal.h')
-rw-r--r--src/lib/libssl/tls13_internal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h
index 6ddce37ca3..2738c40c4c 100644
--- a/src/lib/libssl/tls13_internal.h
+++ b/src/lib/libssl/tls13_internal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_internal.h,v 1.14 2019/01/21 13:13:46 jsing Exp $ */ 1/* $OpenBSD: tls13_internal.h,v 1.15 2019/01/21 13:45:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2018 Bob Beck <beck@openbsd.org>
4 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
@@ -26,6 +26,9 @@
26 26
27__BEGIN_HIDDEN_DECLS 27__BEGIN_HIDDEN_DECLS
28 28
29#define TLS13_HS_CLIENT 1
30#define TLS13_HS_SERVER 2
31
29#define TLS13_IO_SUCCESS 1 32#define TLS13_IO_SUCCESS 1
30#define TLS13_IO_EOF 0 33#define TLS13_IO_EOF 0
31#define TLS13_IO_FAILURE -1 34#define TLS13_IO_FAILURE -1
@@ -152,9 +155,13 @@ struct tls13_ctx {
152 struct tls13_handshake_msg *hs_msg; 155 struct tls13_handshake_msg *hs_msg;
153}; 156};
154 157
158struct tls13_ctx *tls13_ctx_new(int mode);
159void tls13_ctx_free(struct tls13_ctx *ctx);
160
155/* 161/*
156 * Legacy interfaces. 162 * Legacy interfaces.
157 */ 163 */
164int tls13_legacy_return_code(SSL *ssl, ssize_t ret);
158ssize_t tls13_legacy_wire_read_cb(void *buf, size_t n, void *arg); 165ssize_t tls13_legacy_wire_read_cb(void *buf, size_t n, void *arg);
159ssize_t tls13_legacy_wire_write_cb(const void *buf, size_t n, void *arg); 166ssize_t tls13_legacy_wire_write_cb(const void *buf, size_t n, void *arg);
160int tls13_legacy_read_bytes(SSL *ssl, int type, unsigned char *buf, int len, 167int tls13_legacy_read_bytes(SSL *ssl, int type, unsigned char *buf, int len,