summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/tls13_internal.h')
-rw-r--r--src/lib/libssl/tls13_internal.h69
1 files changed, 67 insertions, 2 deletions
diff --git a/src/lib/libssl/tls13_internal.h b/src/lib/libssl/tls13_internal.h
index 6172ac25c9..0c48c87c89 100644
--- a/src/lib/libssl/tls13_internal.h
+++ b/src/lib/libssl/tls13_internal.h
@@ -1,5 +1,7 @@
1/* $OpenBSD: tls13_internal.h,v 1.2 2018/11/08 20:38:25 tb Exp $ */ 1/* $OpenBSD: tls13_internal.h,v 1.3 2018/11/08 23:54:59 tb Exp $ */
2/* Copyright (c) 2018, Bob Beck <beck@openbsd.org> 2/*
3 * Copyright (c) 2018, Bob Beck <beck@openbsd.org>
4 * Copyright (c) 2018, Theo Buehler <tb@openbsd.org>
3 * 5 *
4 * Permission to use, copy, modify, and/or distribute this software for any 6 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above 7 * purpose with or without fee is hereby granted, provided that the above
@@ -58,3 +60,66 @@ int tls13_derive_handshake_secrets(struct tls13_secrets *secrets,
58 const struct tls13_secret *context); 60 const struct tls13_secret *context);
59int tls13_derive_application_secrets(struct tls13_secrets *secrets, 61int tls13_derive_application_secrets(struct tls13_secrets *secrets,
60 const EVP_MD *digest, const struct tls13_secret *context); 62 const EVP_MD *digest, const struct tls13_secret *context);
63
64struct tls13_ctx;
65
66/*
67 * RFC 8446, Section B.3
68 *
69 * Values listed as "_RESERVED" were used in previous versions of TLS and are
70 * listed here for completeness. TLS 1.3 implementations MUST NOT send them but
71 * might receive them from older TLS implementations.
72 */
73#define TLS13_MT_HELLO_REQUEST_RESERVED 0
74#define TLS13_MT_CLIENT_HELLO 1
75#define TLS13_MT_SERVER_HELLO 2
76#define TLS13_MT_HELLO_VERIFY_REQUEST_RESERVED 3
77#define TLS13_MT_NEW_SESSION_TICKET 4
78#define TLS13_MT_END_OF_EARLY_DATA 5
79#define TLS13_MT_HELLO_RETRY_REQUEST_RESERVED 6
80#define TLS13_MT_ENCRYPTED_EXTENSIONS 8
81#define TLS13_MT_CERTIFICATE 11
82#define TLS13_MT_SERVER_KEY_EXCHANGE_RESERVED 12
83#define TLS13_MT_CERTIFICATE_REQUEST 13
84#define TLS13_MT_SERVER_HELLO_DONE_RESERVED 14
85#define TLS13_MT_CERTIFICATE_VERIFY 15
86#define TLS13_MT_CLIENT_KEY_EXCHANGE_RESERVED 16
87#define TLS13_MT_FINISHED 20
88#define TLS13_MT_CERTIFICATE_URL_RESERVED 21
89#define TLS13_MT_CERTIFICATE_STATUS_RESERVED 22
90#define TLS13_MT_SUPPLEMENTAL_DATA_RESERVED 23
91#define TLS13_MT_KEY_UPDATE 24
92#define TLS13_MT_MESSAGE_HASH 254
93
94int tls13_client_hello_send(struct tls13_ctx *ctx);
95int tls13_client_hello_recv(struct tls13_ctx *ctx);
96int tls13_client_hello_retry_send(struct tls13_ctx *ctx);
97int tls13_client_hello_retry_recv(struct tls13_ctx *ctx);
98int tls13_client_end_of_early_data_send(struct tls13_ctx *ctx);
99int tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx);
100int tls13_client_certificate_send(struct tls13_ctx *ctx);
101int tls13_client_certificate_recv(struct tls13_ctx *ctx);
102int tls13_client_certificate_verify_send(struct tls13_ctx *ctx);
103int tls13_client_certificate_verify_recv(struct tls13_ctx *ctx);
104int tls13_client_finished_recv(struct tls13_ctx *ctx);
105int tls13_client_finished_send(struct tls13_ctx *ctx);
106int tls13_client_key_update_send(struct tls13_ctx *ctx);
107int tls13_client_key_update_recv(struct tls13_ctx *ctx);
108int tls13_server_hello_recv(struct tls13_ctx *ctx);
109int tls13_server_hello_send(struct tls13_ctx *ctx);
110int tls13_server_new_session_ticket_recv(struct tls13_ctx *ctx);
111int tls13_server_new_session_ticket_send(struct tls13_ctx *ctx);
112int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx);
113int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx);
114int tls13_server_certificate_recv(struct tls13_ctx *ctx);
115int tls13_server_certificate_send(struct tls13_ctx *ctx);
116int tls13_server_certificate_request_recv(struct tls13_ctx *ctx);
117int tls13_server_certificate_request_send(struct tls13_ctx *ctx);
118int tls13_server_certificate_verify_send(struct tls13_ctx *ctx);
119int tls13_server_certificate_verify_recv(struct tls13_ctx *ctx);
120int tls13_server_finished_recv(struct tls13_ctx *ctx);
121int tls13_server_finished_send(struct tls13_ctx *ctx);
122int tls13_server_key_update_recv(struct tls13_ctx *ctx);
123int tls13_server_key_update_send(struct tls13_ctx *ctx);
124int tls13_server_message_hash_recv(struct tls13_ctx *ctx);
125int tls13_server_message_hash_send(struct tls13_ctx *ctx);