]> git.ipfire.org Git - thirdparty/openssl.git/blame - ssl/statem/statem_locl.h
aes/asm/{aes-armv4|bsaes-armv7}.pl: make it work with binutils-2.29.
[thirdparty/openssl.git] / ssl / statem / statem_locl.h
CommitLineData
846e33c7
RS
1/*
2 * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
61ae935a 3 *
846e33c7
RS
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
61ae935a
MC
8 */
9
10/*****************************************************************************
11 * *
12 * The following definitions are PRIVATE to the state machine. They should *
13 * NOT be used outside of the state machine. *
14 * *
15 *****************************************************************************/
16
17/* Max message length definitions */
18
19/* The spec allows for a longer length than this, but we limit it */
20#define HELLO_VERIFY_REQUEST_MAX_LENGTH 258
ef6c191b 21#define END_OF_EARLY_DATA_MAX_LENGTH 0
61ae935a 22#define SERVER_HELLO_MAX_LENGTH 20000
3847d426 23#define HELLO_RETRY_REQUEST_MAX_LENGTH 20000
e46f2334 24#define ENCRYPTED_EXTENSIONS_MAX_LENGTH 20000
61ae935a
MC
25#define SERVER_KEY_EXCH_MAX_LENGTH 102400
26#define SERVER_HELLO_DONE_MAX_LENGTH 0
e1c3de44 27#define KEY_UPDATE_MAX_LENGTH 1
61ae935a
MC
28#define CCS_MAX_LENGTH 1
29/* Max should actually be 36 but we are generous */
30#define FINISHED_MAX_LENGTH 64
31
f14afcaa
MC
32/* The maximum number of incoming KeyUpdate messages we will accept */
33#define MAX_KEY_UPDATE_MESSAGES 32
34
f7e393be
MC
35/* Dummy message type */
36#define SSL3_MT_DUMMY -1
37
61ae935a 38/* Message processing return codes */
be3583fa 39typedef enum {
61ae935a
MC
40 /* Something bad happened */
41 MSG_PROCESS_ERROR,
42 /* We've finished reading - swap to writing */
43 MSG_PROCESS_FINISHED_READING,
44 /*
45 * We've completed the main processing of this message but there is some
46 * post processing to be done.
47 */
48 MSG_PROCESS_CONTINUE_PROCESSING,
49 /* We've finished this message - read the next message */
50 MSG_PROCESS_CONTINUE_READING
be3583fa 51} MSG_PROCESS_RETURN;
61ae935a
MC
52
53/* Flush the write BIO */
54int statem_flush(SSL *s);
55
a15c953f
MC
56typedef int (*confunc_f) (SSL *s, WPACKET *pkt);
57
9e84a42d 58int check_in_list(SSL *s, uint16_t group_id, const uint16_t *groups,
aff9929b 59 size_t num_groups, int checkallow);
11c67eea 60int create_synthetic_message_hash(SSL *s);
5d6cca05
DSH
61int parse_ca_names(SSL *s, PACKET *pkt, int *al);
62int construct_ca_names(SSL *s, WPACKET *pkt);
72ceb6a6
DSH
63size_t construct_key_exchange_tbs(const SSL *s, unsigned char **ptbs,
64 const void *param, size_t paramlen);
5d6cca05 65
61ae935a
MC
66/*
67 * TLS/DTLS client state machine functions
68 */
8481f583
MC
69int ossl_statem_client_read_transition(SSL *s, int mt);
70WRITE_TRAN ossl_statem_client_write_transition(SSL *s);
71WORK_STATE ossl_statem_client_pre_work(SSL *s, WORK_STATE wst);
72WORK_STATE ossl_statem_client_post_work(SSL *s, WORK_STATE wst);
6392fb8e 73int ossl_statem_client_construct_message(SSL *s, WPACKET *pkt,
a15c953f 74 confunc_f *confunc, int *mt);
eda75751 75size_t ossl_statem_client_max_message_size(SSL *s);
8481f583
MC
76MSG_PROCESS_RETURN ossl_statem_client_process_message(SSL *s, PACKET *pkt);
77WORK_STATE ossl_statem_client_post_process_message(SSL *s, WORK_STATE wst);
61ae935a
MC
78
79/*
80 * TLS/DTLS server state machine functions
81 */
8481f583
MC
82int ossl_statem_server_read_transition(SSL *s, int mt);
83WRITE_TRAN ossl_statem_server_write_transition(SSL *s);
84WORK_STATE ossl_statem_server_pre_work(SSL *s, WORK_STATE wst);
85WORK_STATE ossl_statem_server_post_work(SSL *s, WORK_STATE wst);
6392fb8e 86int ossl_statem_server_construct_message(SSL *s, WPACKET *pkt,
a15c953f 87 confunc_f *confunc,int *mt);
eda75751 88size_t ossl_statem_server_max_message_size(SSL *s);
8481f583
MC
89MSG_PROCESS_RETURN ossl_statem_server_process_message(SSL *s, PACKET *pkt);
90WORK_STATE ossl_statem_server_post_process_message(SSL *s, WORK_STATE wst);
61ae935a
MC
91
92/* Functions for getting new message data */
93__owur int tls_get_message_header(SSL *s, int *mt);
eda75751
MC
94__owur int tls_get_message_body(SSL *s, size_t *len);
95__owur int dtls_get_message(SSL *s, int *mt, size_t *len);
61ae935a
MC
96
97/* Message construction and processing functions */
7776a36c 98__owur int tls_process_initial_server_flight(SSL *s, int *al);
be3583fa
MC
99__owur MSG_PROCESS_RETURN tls_process_change_cipher_spec(SSL *s, PACKET *pkt);
100__owur MSG_PROCESS_RETURN tls_process_finished(SSL *s, PACKET *pkt);
7cea05dc
MC
101__owur int tls_construct_change_cipher_spec(SSL *s, WPACKET *pkt);
102__owur int dtls_construct_change_cipher_spec(SSL *s, WPACKET *pkt);
61ae935a 103
229185e6 104__owur int tls_construct_finished(SSL *s, WPACKET *pkt);
44c04a2e 105__owur int tls_construct_key_update(SSL *s, WPACKET *pkt);
e1c3de44 106__owur MSG_PROCESS_RETURN tls_process_key_update(SSL *s, PACKET *pkt);
30f05b19 107__owur WORK_STATE tls_finish_handshake(SSL *s, WORK_STATE wst, int clearbufs);
be3583fa 108__owur WORK_STATE dtls_wait_for_dry(SSL *s);
61ae935a
MC
109
110/* some client-only functions */
7cea05dc 111__owur int tls_construct_client_hello(SSL *s, WPACKET *pkt);
be3583fa
MC
112__owur MSG_PROCESS_RETURN tls_process_server_hello(SSL *s, PACKET *pkt);
113__owur MSG_PROCESS_RETURN tls_process_certificate_request(SSL *s, PACKET *pkt);
114__owur MSG_PROCESS_RETURN tls_process_new_session_ticket(SSL *s, PACKET *pkt);
f63e4288 115__owur int tls_process_cert_status_body(SSL *s, PACKET *pkt, int *al);
be3583fa
MC
116__owur MSG_PROCESS_RETURN tls_process_cert_status(SSL *s, PACKET *pkt);
117__owur MSG_PROCESS_RETURN tls_process_server_done(SSL *s, PACKET *pkt);
d8bc1399 118__owur int tls_construct_cert_verify(SSL *s, WPACKET *pkt);
be3583fa 119__owur WORK_STATE tls_prepare_client_certificate(SSL *s, WORK_STATE wst);
7cea05dc 120__owur int tls_construct_client_certificate(SSL *s, WPACKET *pkt);
61ae935a 121__owur int ssl_do_client_cert_cb(SSL *s, X509 **px509, EVP_PKEY **ppkey);
7cea05dc 122__owur int tls_construct_client_key_exchange(SSL *s, WPACKET *pkt);
61ae935a 123__owur int tls_client_key_exchange_post_work(SSL *s);
f63e4288 124__owur int tls_construct_cert_status_body(SSL *s, WPACKET *pkt);
7cea05dc 125__owur int tls_construct_cert_status(SSL *s, WPACKET *pkt);
a230b26e 126__owur MSG_PROCESS_RETURN tls_process_key_exchange(SSL *s, PACKET *pkt);
be3583fa 127__owur MSG_PROCESS_RETURN tls_process_server_certificate(SSL *s, PACKET *pkt);
61ae935a 128__owur int ssl3_check_cert_and_algorithm(SSL *s);
a230b26e 129#ifndef OPENSSL_NO_NEXTPROTONEG
7cea05dc 130__owur int tls_construct_next_proto(SSL *s, WPACKET *pkt);
a230b26e 131#endif
c7f47786 132__owur MSG_PROCESS_RETURN tls_process_hello_req(SSL *s, PACKET *pkt);
be3583fa 133__owur MSG_PROCESS_RETURN dtls_process_hello_verify(SSL *s, PACKET *pkt);
ef6c191b 134__owur int tls_construct_end_of_early_data(SSL *s, WPACKET *pkt);
61ae935a
MC
135
136/* some server-only functions */
be3583fa
MC
137__owur MSG_PROCESS_RETURN tls_process_client_hello(SSL *s, PACKET *pkt);
138__owur WORK_STATE tls_post_process_client_hello(SSL *s, WORK_STATE wst);
7cea05dc 139__owur int tls_construct_server_hello(SSL *s, WPACKET *pkt);
7cea05dc
MC
140__owur int dtls_construct_hello_verify_request(SSL *s, WPACKET *pkt);
141__owur int tls_construct_server_certificate(SSL *s, WPACKET *pkt);
142__owur int tls_construct_server_key_exchange(SSL *s, WPACKET *pkt);
143__owur int tls_construct_certificate_request(SSL *s, WPACKET *pkt);
144__owur int tls_construct_server_done(SSL *s, WPACKET *pkt);
be3583fa
MC
145__owur MSG_PROCESS_RETURN tls_process_client_certificate(SSL *s, PACKET *pkt);
146__owur MSG_PROCESS_RETURN tls_process_client_key_exchange(SSL *s, PACKET *pkt);
147__owur WORK_STATE tls_post_process_client_key_exchange(SSL *s, WORK_STATE wst);
148__owur MSG_PROCESS_RETURN tls_process_cert_verify(SSL *s, PACKET *pkt);
a230b26e 149#ifndef OPENSSL_NO_NEXTPROTONEG
be3583fa 150__owur MSG_PROCESS_RETURN tls_process_next_proto(SSL *s, PACKET *pkt);
a230b26e 151#endif
7cea05dc 152__owur int tls_construct_new_session_ticket(SSL *s, WPACKET *pkt);
ef6c191b 153MSG_PROCESS_RETURN tls_process_end_of_early_data(SSL *s, PACKET *pkt);
6b473aca 154
70af3d8e
MC
155
156/* Extension processing */
157
355a0d10 158typedef enum ext_return_en {
b186a592
MC
159 EXT_RETURN_FAIL,
160 EXT_RETURN_SENT,
161 EXT_RETURN_NOT_SENT
162} EXT_RETURN;
163
43ae5eed
MC
164__owur int extension_is_relevant(SSL *s, unsigned int extctx,
165 unsigned int thisctx);
70af3d8e 166__owur int tls_collect_extensions(SSL *s, PACKET *packet, unsigned int context,
735d5b59
TT
167 RAW_EXTENSION **res, int *al, size_t *len,
168 int init);
7d152a3c 169__owur int tls_parse_extension(SSL *s, TLSEXT_INDEX idx, int context,
8521ced6 170 RAW_EXTENSION *exts, X509 *x, size_t chainidx,
f97d4c37 171 int *al);
4b299b8e 172__owur int tls_parse_all_extensions(SSL *s, int context, RAW_EXTENSION *exts,
735d5b59 173 X509 *x, size_t chainidx, int *al, int fin);
43ae5eed
MC
174__owur int should_add_extension(SSL *s, unsigned int extctx,
175 unsigned int thisctx, int max_version);
4b299b8e 176__owur int tls_construct_extensions(SSL *s, WPACKET *pkt, unsigned int context,
8521ced6 177 X509 *x, size_t chainidx, int *al);
25670f3e 178
1053a6e2
MC
179__owur int tls_psk_do_binder(SSL *s, const EVP_MD *md,
180 const unsigned char *msgstart,
181 size_t binderoffset, const unsigned char *binderin,
182 unsigned char *binderout,
3a7c56b2 183 SSL_SESSION *sess, int sign, int external);
1053a6e2 184
25670f3e 185/* Server Extension processing */
61138358
MC
186int tls_parse_ctos_renegotiate(SSL *s, PACKET *pkt, unsigned int context,
187 X509 *x, size_t chainidx, int *al);
188int tls_parse_ctos_server_name(SSL *s, PACKET *pkt, unsigned int context,
189 X509 *x, size_t chainidx, int *al);
25670f3e 190#ifndef OPENSSL_NO_SRP
61138358
MC
191int tls_parse_ctos_srp(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
192 size_t chainidx, int *al);
25670f3e 193#endif
0a87d0ac
MC
194int tls_parse_ctos_early_data(SSL *s, PACKET *pkt, unsigned int context,
195 X509 *x, size_t chainidx, int *al);
25670f3e 196#ifndef OPENSSL_NO_EC
61138358
MC
197int tls_parse_ctos_ec_pt_formats(SSL *s, PACKET *pkt, unsigned int context,
198 X509 *x, size_t chainidx, int *al);
199int tls_parse_ctos_supported_groups(SSL *s, PACKET *pkt, unsigned int context,
200 X509 *x, size_t chainidx, int *al);
25670f3e 201#endif
61138358
MC
202int tls_parse_ctos_session_ticket(SSL *s, PACKET *pkt, unsigned int context,
203 X509 *x, size_t chainidx, int *al);
204int tls_parse_ctos_sig_algs(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
205 size_t chainidx, int *al);
ab83e314 206#ifndef OPENSSL_NO_OCSP
61138358
MC
207int tls_parse_ctos_status_request(SSL *s, PACKET *pkt, unsigned int context,
208 X509 *x, size_t chainidx, int *al);
ab83e314 209#endif
25670f3e 210#ifndef OPENSSL_NO_NEXTPROTONEG
61138358
MC
211int tls_parse_ctos_npn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
212 size_t chainidx, int *al);
25670f3e 213#endif
61138358
MC
214int tls_parse_ctos_alpn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
215 size_t chainidx, int *al);
25670f3e 216#ifndef OPENSSL_NO_SRTP
61138358
MC
217int tls_parse_ctos_use_srtp(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
218 size_t chainidx, int *al);
25670f3e 219#endif
61138358
MC
220int tls_parse_ctos_etm(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
221 size_t chainidx, int *al);
222int tls_parse_ctos_key_share(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
223 size_t chainidx, int *al);
224int tls_parse_ctos_ems(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
225 size_t chainidx, int *al);
226int tls_parse_ctos_psk_kex_modes(SSL *s, PACKET *pkt, unsigned int context,
227 X509 *x, size_t chainidx, int *al);
228int tls_parse_ctos_psk(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
229 size_t chainidx, int *al);
7da160b0 230
b186a592
MC
231EXT_RETURN tls_construct_stoc_renegotiate(SSL *s, WPACKET *pkt,
232 unsigned int context, X509 *x,
233 size_t chainidx, int *al);
234EXT_RETURN tls_construct_stoc_server_name(SSL *s, WPACKET *pkt,
235 unsigned int context, X509 *x,
236 size_t chainidx, int *al);
237EXT_RETURN tls_construct_stoc_early_data(SSL *s, WPACKET *pkt,
238 unsigned int context, X509 *x,
239 size_t chainidx, int *al);
ab83e314 240#ifndef OPENSSL_NO_EC
b186a592
MC
241EXT_RETURN tls_construct_stoc_ec_pt_formats(SSL *s, WPACKET *pkt,
242 unsigned int context, X509 *x,
243 size_t chainidx, int *al);
ab83e314 244#endif
b186a592
MC
245EXT_RETURN tls_construct_stoc_supported_groups(SSL *s, WPACKET *pkt,
246 unsigned int context, X509 *x,
247 size_t chainidx, int *al);
248EXT_RETURN tls_construct_stoc_session_ticket(SSL *s, WPACKET *pkt,
249 unsigned int context, X509 *x,
250 size_t chainidx, int *al);
ab83e314 251#ifndef OPENSSL_NO_OCSP
b186a592
MC
252EXT_RETURN tls_construct_stoc_status_request(SSL *s, WPACKET *pkt,
253 unsigned int context, X509 *x,
254 size_t chainidx, int *al);
ab83e314
MC
255#endif
256#ifndef OPENSSL_NO_NEXTPROTONEG
b186a592
MC
257EXT_RETURN tls_construct_stoc_next_proto_neg(SSL *s, WPACKET *pkt,
258 unsigned int context, X509 *x,
259 size_t chainidx, int *al);
ab83e314 260#endif
b186a592
MC
261EXT_RETURN tls_construct_stoc_alpn(SSL *s, WPACKET *pkt, unsigned int context,
262 X509 *x, size_t chainidx, int *al);
ab83e314 263#ifndef OPENSSL_NO_SRTP
b186a592 264EXT_RETURN tls_construct_stoc_use_srtp(SSL *s, WPACKET *pkt, unsigned int context,
61138358 265 X509 *x, size_t chainidx, int *al);
ab83e314 266#endif
b186a592
MC
267EXT_RETURN tls_construct_stoc_etm(SSL *s, WPACKET *pkt, unsigned int context,
268 X509 *x, size_t chainidx, int *al);
269EXT_RETURN tls_construct_stoc_ems(SSL *s, WPACKET *pkt, unsigned int context,
270 X509 *x, size_t chainidx, int *al);
271EXT_RETURN tls_construct_stoc_key_share(SSL *s, WPACKET *pkt,
272 unsigned int context, X509 *x,
273 size_t chainidx, int *al);
7da160b0
MC
274/*
275 * Not in public headers as this is not an official extension. Only used when
276 * SSL_OP_CRYPTOPRO_TLSEXT_BUG is set.
277 */
278#define TLSEXT_TYPE_cryptopro_bug 0xfde8
b186a592
MC
279EXT_RETURN tls_construct_stoc_cryptopro_bug(SSL *s, WPACKET *pkt,
280 unsigned int context, X509 *x,
281 size_t chainidx, int *al);
282EXT_RETURN tls_construct_stoc_psk(SSL *s, WPACKET *pkt, unsigned int context,
283 X509 *x, size_t chainidx, int *al);
6dd083fd
MC
284
285/* Client Extension processing */
b186a592 286EXT_RETURN tls_construct_ctos_renegotiate(SSL *s, WPACKET *pkt, unsigned int context,
61138358 287 X509 *x, size_t chainidx, int *al);
b186a592 288EXT_RETURN tls_construct_ctos_server_name(SSL *s, WPACKET *pkt, unsigned int context,
61138358 289 X509 *x, size_t chainidx, int *al);
ab83e314 290#ifndef OPENSSL_NO_SRP
b186a592 291EXT_RETURN tls_construct_ctos_srp(SSL *s, WPACKET *pkt, unsigned int context, X509 *x,
61138358 292 size_t chainidx, int *al);
ab83e314
MC
293#endif
294#ifndef OPENSSL_NO_EC
b186a592
MC
295EXT_RETURN tls_construct_ctos_ec_pt_formats(SSL *s, WPACKET *pkt,
296 unsigned int context, X509 *x,
297 size_t chainidx, int *al);
298EXT_RETURN tls_construct_ctos_supported_groups(SSL *s, WPACKET *pkt,
299 unsigned int context, X509 *x,
300 size_t chainidx, int *al);
ab83e314 301#endif
b186a592
MC
302EXT_RETURN tls_construct_ctos_early_data(SSL *s, WPACKET *pkt,
303 unsigned int context, X509 *x,
304 size_t chainidx, int *al);
305EXT_RETURN tls_construct_ctos_session_ticket(SSL *s, WPACKET *pkt,
306 unsigned int context, X509 *x,
307 size_t chainidx, int *al);
308EXT_RETURN tls_construct_ctos_sig_algs(SSL *s, WPACKET *pkt,
309 unsigned int context, X509 *x,
310 size_t chainidx, int *al);
ab83e314 311#ifndef OPENSSL_NO_OCSP
b186a592
MC
312EXT_RETURN tls_construct_ctos_status_request(SSL *s, WPACKET *pkt,
313 unsigned int context, X509 *x,
314 size_t chainidx, int *al);
ab83e314
MC
315#endif
316#ifndef OPENSSL_NO_NEXTPROTONEG
b186a592
MC
317EXT_RETURN tls_construct_ctos_npn(SSL *s, WPACKET *pkt, unsigned int context,
318 X509 *x, size_t chainidx, int *al);
ab83e314 319#endif
b186a592
MC
320EXT_RETURN tls_construct_ctos_alpn(SSL *s, WPACKET *pkt, unsigned int context,
321 X509 *x, size_t chainidx, int *al);
ab83e314 322#ifndef OPENSSL_NO_SRTP
b186a592
MC
323EXT_RETURN tls_construct_ctos_use_srtp(SSL *s, WPACKET *pkt, unsigned int context,
324 X509 *x, size_t chainidx, int *al);
ab83e314 325#endif
b186a592
MC
326EXT_RETURN tls_construct_ctos_etm(SSL *s, WPACKET *pkt, unsigned int context,
327 X509 *x, size_t chainidx, int *al);
ab83e314 328#ifndef OPENSSL_NO_CT
b186a592
MC
329EXT_RETURN tls_construct_ctos_sct(SSL *s, WPACKET *pkt, unsigned int context,
330 X509 *x, size_t chainidx, int *al);
ab83e314 331#endif
b186a592
MC
332EXT_RETURN tls_construct_ctos_ems(SSL *s, WPACKET *pkt, unsigned int context,
333 X509 *x, size_t chainidx, int *al);
334EXT_RETURN tls_construct_ctos_supported_versions(SSL *s, WPACKET *pkt,
335 unsigned int context, X509 *x,
336 size_t chainidx, int *al);
337EXT_RETURN tls_construct_ctos_key_share(SSL *s, WPACKET *pkt,
338 unsigned int context, X509 *x,
339 size_t chainidx, int *al);
340EXT_RETURN tls_construct_ctos_psk_kex_modes(SSL *s, WPACKET *pkt,
341 unsigned int context, X509 *x,
342 size_t chainidx, int *al);
343EXT_RETURN tls_construct_ctos_cookie(SSL *s, WPACKET *pkt, unsigned int context,
61138358 344 X509 *x, size_t chainidx, int *al);
b186a592
MC
345EXT_RETURN tls_construct_ctos_padding(SSL *s, WPACKET *pkt,
346 unsigned int context, X509 *x,
347 size_t chainidx, int *al);
348EXT_RETURN tls_construct_ctos_psk(SSL *s, WPACKET *pkt, unsigned int context,
349 X509 *x, size_t chainidx, int *al);
61138358
MC
350int tls_parse_stoc_renegotiate(SSL *s, PACKET *pkt, unsigned int context,
351 X509 *x, size_t chainidx, int *al);
352int tls_parse_stoc_server_name(SSL *s, PACKET *pkt, unsigned int context,
353 X509 *x, size_t chainidx, int *al);
b2cc7f31
MC
354int tls_parse_stoc_early_data(SSL *s, PACKET *pkt, unsigned int context,
355 X509 *x, size_t chainidx, int *al);
6dd083fd 356#ifndef OPENSSL_NO_EC
61138358
MC
357int tls_parse_stoc_ec_pt_formats(SSL *s, PACKET *pkt, unsigned int context,
358 X509 *x, size_t chainidx, int *al);
6dd083fd 359#endif
61138358
MC
360int tls_parse_stoc_session_ticket(SSL *s, PACKET *pkt, unsigned int context,
361 X509 *x, size_t chainidx, int *al);
ab83e314 362#ifndef OPENSSL_NO_OCSP
61138358
MC
363int tls_parse_stoc_status_request(SSL *s, PACKET *pkt, unsigned int context,
364 X509 *x, size_t chainidx, int *al);
ab83e314 365#endif
6dd083fd 366#ifndef OPENSSL_NO_CT
61138358
MC
367int tls_parse_stoc_sct(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
368 size_t chainidx, int *al);
6dd083fd
MC
369#endif
370#ifndef OPENSSL_NO_NEXTPROTONEG
61138358
MC
371int tls_parse_stoc_npn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
372 size_t chainidx, int *al);
6dd083fd 373#endif
61138358
MC
374int tls_parse_stoc_alpn(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
375 size_t chainidx, int *al);
6dd083fd 376#ifndef OPENSSL_NO_SRTP
61138358
MC
377int tls_parse_stoc_use_srtp(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
378 size_t chainidx, int *al);
6dd083fd 379#endif
61138358
MC
380int tls_parse_stoc_etm(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
381 size_t chainidx, int *al);
382int tls_parse_stoc_ems(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
383 size_t chainidx, int *al);
384int tls_parse_stoc_key_share(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
385 size_t chainidx, int *al);
cfef5027
MC
386int tls_parse_stoc_cookie(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
387 size_t chainidx, int *al);
61138358
MC
388int tls_parse_stoc_psk(SSL *s, PACKET *pkt, unsigned int context, X509 *x,
389 size_t chainidx, int *al);
630369d9
MC
390
391int tls_handle_alpn(SSL *s, int *al);