1 /* $OpenBSD: tls13_handshake.h,v 1.5 2020/04/22 17:05:07 jsing Exp $ */ 2 /* 3 * Copyright (c) 2019 Theo Buehler <tb@openbsd.org> 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 12 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 14 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 15 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 #ifndef HEADER_TLS13_HANDSHAKE_H 19 #define HEADER_TLS13_HANDSHAKE_H 20 21 #include <stddef.h> /* for NULL */ 22 23 __BEGIN_HIDDEN_DECLS 24 25 #define INITIAL 0x00 26 #define NEGOTIATED 0x01 27 #define WITHOUT_HRR 0x02 28 #define WITHOUT_CR 0x04 29 #define WITH_PSK 0x08 30 #define WITH_CCV 0x10 31 #define WITH_0RTT 0x20 32 33 enum tls13_message_type { 34 INVALID, 35 CLIENT_HELLO, 36 SERVER_HELLO_RETRY_REQUEST, 37 CLIENT_HELLO_RETRY, 38 SERVER_HELLO, 39 SERVER_ENCRYPTED_EXTENSIONS, 40 SERVER_CERTIFICATE_REQUEST, 41 SERVER_CERTIFICATE, 42 SERVER_CERTIFICATE_VERIFY, 43 SERVER_FINISHED, 44 CLIENT_END_OF_EARLY_DATA, 45 CLIENT_CERTIFICATE, 46 CLIENT_CERTIFICATE_VERIFY, 47 CLIENT_FINISHED, 48 APPLICATION_DATA, 49 TLS13_NUM_MESSAGE_TYPES, 50 }; 51 52 __END_HIDDEN_DECLS 53 54 #endif /* !HEADER_TLS13_HANDSHAKE_H */ 55