summaryrefslogtreecommitdiffstats
path: root/lib/libssl/tls13_internal.h
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2019-01-21 13:45:57 +0000
committerjsing <jsing@openbsd.org>2019-01-21 13:45:57 +0000
commit202907923950fe61d51222c25d06abcdb2ce8186 (patch)
tree931a34ae58a9d72f6eed54d4fb2d72b118ec6f44 /lib/libssl/tls13_internal.h
parentWire up the handshake message send and recv actions. (diff)
downloadwireguard-openbsd-202907923950fe61d51222c25d06abcdb2ce8186.tar.xz
wireguard-openbsd-202907923950fe61d51222c25d06abcdb2ce8186.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 'lib/libssl/tls13_internal.h')
-rw-r--r--lib/libssl/tls13_internal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/libssl/tls13_internal.h b/lib/libssl/tls13_internal.h
index 6ddce37ca32..2738c40c4c1 100644
--- a/lib/libssl/tls13_internal.h
+++ b/lib/libssl/tls13_internal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls13_internal.h,v 1.14 2019/01/21 13:13:46 jsing Exp $ */
+/* $OpenBSD: tls13_internal.h,v 1.15 2019/01/21 13:45:57 jsing Exp $ */
/*
* Copyright (c) 2018 Bob Beck <beck@openbsd.org>
* Copyright (c) 2018 Theo Buehler <tb@openbsd.org>
@@ -26,6 +26,9 @@
__BEGIN_HIDDEN_DECLS
+#define TLS13_HS_CLIENT 1
+#define TLS13_HS_SERVER 2
+
#define TLS13_IO_SUCCESS 1
#define TLS13_IO_EOF 0
#define TLS13_IO_FAILURE -1
@@ -152,9 +155,13 @@ struct tls13_ctx {
struct tls13_handshake_msg *hs_msg;
};
+struct tls13_ctx *tls13_ctx_new(int mode);
+void tls13_ctx_free(struct tls13_ctx *ctx);
+
/*
* Legacy interfaces.
*/
+int tls13_legacy_return_code(SSL *ssl, ssize_t ret);
ssize_t tls13_legacy_wire_read_cb(void *buf, size_t n, void *arg);
ssize_t tls13_legacy_wire_write_cb(const void *buf, size_t n, void *arg);
int tls13_legacy_read_bytes(SSL *ssl, int type, unsigned char *buf, int len,