VirtualBox

source: vbox/trunk/src/libs/openssl-3.4.1/ssl/statem/statem_local.h@ 109052

Last change on this file since 109052 was 109052, checked in by vboxsync, 4 weeks ago

openssl-3.4.1: Applied our changes, regenerated files, added missing files and functions. This time with a three way merge. ​bugref:10890

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 31.0 KB
Line 
1/*
2 * Copyright 2015-2023 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (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
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
21#define END_OF_EARLY_DATA_MAX_LENGTH 0
22#define HELLO_RETRY_REQUEST_MAX_LENGTH 20000
23#define ENCRYPTED_EXTENSIONS_MAX_LENGTH 20000
24#define SESSION_TICKET_MAX_LENGTH_TLS13 131338
25#define SESSION_TICKET_MAX_LENGTH_TLS12 65541
26#define SERVER_KEY_EXCH_MAX_LENGTH 102400
27#define SERVER_HELLO_DONE_MAX_LENGTH 0
28#define KEY_UPDATE_MAX_LENGTH 1
29#define CCS_MAX_LENGTH 1
30
31/* Max ServerHello size permitted by RFC 8446 */
32#define SERVER_HELLO_MAX_LENGTH 65607
33
34/* Max CertificateVerify size permitted by RFC 8446 */
35#define CERTIFICATE_VERIFY_MAX_LENGTH 65539
36
37/* Max should actually be 36 but we are generous */
38#define FINISHED_MAX_LENGTH 64
39
40/* Dummy message type */
41#define SSL3_MT_DUMMY -1
42
43/* Invalid extension ID for non-supported extensions */
44#define TLSEXT_TYPE_invalid 0x10000
45#define TLSEXT_TYPE_out_of_range 0x10001
46unsigned int ossl_get_extension_type(size_t idx);
47
48extern const unsigned char hrrrandom[];
49
50/* Message processing return codes */
51typedef enum {
52 /* Something bad happened */
53 MSG_PROCESS_ERROR,
54 /* We've finished reading - swap to writing */
55 MSG_PROCESS_FINISHED_READING,
56 /*
57 * We've completed the main processing of this message but there is some
58 * post processing to be done.
59 */
60 MSG_PROCESS_CONTINUE_PROCESSING,
61 /* We've finished this message - read the next message */
62 MSG_PROCESS_CONTINUE_READING
63} MSG_PROCESS_RETURN;
64
65typedef CON_FUNC_RETURN (*confunc_f) (SSL_CONNECTION *s, WPACKET *pkt);
66
67int ssl3_take_mac(SSL_CONNECTION *s);
68int check_in_list(SSL_CONNECTION *s, uint16_t group_id, const uint16_t *groups,
69 size_t num_groups, int checkallow);
70int create_synthetic_message_hash(SSL_CONNECTION *s,
71 const unsigned char *hashval,
72 size_t hashlen, const unsigned char *hrr,
73 size_t hrrlen);
74int parse_ca_names(SSL_CONNECTION *s, PACKET *pkt);
75const STACK_OF(X509_NAME) *get_ca_names(SSL_CONNECTION *s);
76int construct_ca_names(SSL_CONNECTION *s, const STACK_OF(X509_NAME) *ca_sk,
77 WPACKET *pkt);
78size_t construct_key_exchange_tbs(SSL_CONNECTION *s, unsigned char **ptbs,
79 const void *param, size_t paramlen);
80
81/*
82 * TLS/DTLS client state machine functions
83 */
84int ossl_statem_client_read_transition(SSL_CONNECTION *s, int mt);
85WRITE_TRAN ossl_statem_client_write_transition(SSL_CONNECTION *s);
86WORK_STATE ossl_statem_client_pre_work(SSL_CONNECTION *s, WORK_STATE wst);
87WORK_STATE ossl_statem_client_post_work(SSL_CONNECTION *s, WORK_STATE wst);
88int ossl_statem_client_construct_message(SSL_CONNECTION *s,
89 confunc_f *confunc, int *mt);
90size_t ossl_statem_client_max_message_size(SSL_CONNECTION *s);
91MSG_PROCESS_RETURN ossl_statem_client_process_message(SSL_CONNECTION *s,
92 PACKET *pkt);
93WORK_STATE ossl_statem_client_post_process_message(SSL_CONNECTION *s,
94 WORK_STATE wst);
95
96/*
97 * TLS/DTLS server state machine functions
98 */
99int ossl_statem_server_read_transition(SSL_CONNECTION *s, int mt);
100WRITE_TRAN ossl_statem_server_write_transition(SSL_CONNECTION *s);
101WORK_STATE ossl_statem_server_pre_work(SSL_CONNECTION *s, WORK_STATE wst);
102WORK_STATE ossl_statem_server_post_work(SSL_CONNECTION *s, WORK_STATE wst);
103int ossl_statem_server_construct_message(SSL_CONNECTION *s,
104 confunc_f *confunc,int *mt);
105size_t ossl_statem_server_max_message_size(SSL_CONNECTION *s);
106MSG_PROCESS_RETURN ossl_statem_server_process_message(SSL_CONNECTION *s,
107 PACKET *pkt);
108WORK_STATE ossl_statem_server_post_process_message(SSL_CONNECTION *s,
109 WORK_STATE wst);
110
111/* Functions for getting new message data */
112__owur int tls_get_message_header(SSL_CONNECTION *s, int *mt);
113__owur int tls_get_message_body(SSL_CONNECTION *s, size_t *len);
114__owur int dtls_get_message(SSL_CONNECTION *s, int *mt);
115__owur int dtls_get_message_body(SSL_CONNECTION *s, size_t *len);
116
117/* Message construction and processing functions */
118__owur int tls_process_initial_server_flight(SSL_CONNECTION *s);
119__owur MSG_PROCESS_RETURN tls_process_change_cipher_spec(SSL_CONNECTION *s,
120 PACKET *pkt);
121__owur MSG_PROCESS_RETURN tls_process_finished(SSL_CONNECTION *s, PACKET *pkt);
122__owur CON_FUNC_RETURN tls_construct_change_cipher_spec(SSL_CONNECTION *s,
123 WPACKET *pkt);
124__owur CON_FUNC_RETURN dtls_construct_change_cipher_spec(SSL_CONNECTION *s,
125 WPACKET *pkt);
126
127__owur CON_FUNC_RETURN tls_construct_finished(SSL_CONNECTION *s, WPACKET *pkt);
128__owur CON_FUNC_RETURN tls_construct_key_update(SSL_CONNECTION *s, WPACKET *pkt);
129__owur MSG_PROCESS_RETURN tls_process_key_update(SSL_CONNECTION *s,
130 PACKET *pkt);
131__owur WORK_STATE tls_finish_handshake(SSL_CONNECTION *s, WORK_STATE wst,
132 int clearbufs, int stop);
133__owur WORK_STATE dtls_wait_for_dry(SSL_CONNECTION *s);
134
135#ifndef OPENSSL_NO_COMP_ALG
136__owur MSG_PROCESS_RETURN tls13_process_compressed_certificate(SSL_CONNECTION *sc,
137 PACKET *pkt,
138 PACKET *tmppkt,
139 BUF_MEM *buf);
140#endif
141
142/* some client-only functions */
143__owur CON_FUNC_RETURN tls_construct_client_hello(SSL_CONNECTION *s,
144 WPACKET *pkt);
145__owur MSG_PROCESS_RETURN tls_process_server_hello(SSL_CONNECTION *s,
146 PACKET *pkt);
147__owur MSG_PROCESS_RETURN tls_process_certificate_request(SSL_CONNECTION *s,
148 PACKET *pkt);
149__owur MSG_PROCESS_RETURN tls_process_new_session_ticket(SSL_CONNECTION *s,
150 PACKET *pkt);
151__owur int tls_process_cert_status_body(SSL_CONNECTION *s, PACKET *pkt);
152__owur MSG_PROCESS_RETURN tls_process_cert_status(SSL_CONNECTION *s,
153 PACKET *pkt);
154__owur MSG_PROCESS_RETURN tls_process_server_done(SSL_CONNECTION *s,
155 PACKET *pkt);
156__owur CON_FUNC_RETURN tls_construct_cert_verify(SSL_CONNECTION *s,
157 WPACKET *pkt);
158__owur WORK_STATE tls_prepare_client_certificate(SSL_CONNECTION *s,
159 WORK_STATE wst);
160__owur CON_FUNC_RETURN tls_construct_client_certificate(SSL_CONNECTION *s,
161 WPACKET *pkt);
162#ifndef OPENSSL_NO_COMP_ALG
163__owur CON_FUNC_RETURN tls_construct_client_compressed_certificate(SSL_CONNECTION *sc,
164 WPACKET *pkt);
165#endif
166__owur int ssl_do_client_cert_cb(SSL_CONNECTION *s, X509 **px509,
167 EVP_PKEY **ppkey);
168__owur CON_FUNC_RETURN tls_construct_client_key_exchange(SSL_CONNECTION *s,
169 WPACKET *pkt);
170__owur int tls_client_key_exchange_post_work(SSL_CONNECTION *s);
171__owur int tls_construct_cert_status_body(SSL_CONNECTION *s, WPACKET *pkt);
172__owur CON_FUNC_RETURN tls_construct_cert_status(SSL_CONNECTION *s,
173 WPACKET *pkt);
174__owur MSG_PROCESS_RETURN tls_process_key_exchange(SSL_CONNECTION *s,
175 PACKET *pkt);
176__owur MSG_PROCESS_RETURN tls_process_server_rpk(SSL_CONNECTION *sc,
177 PACKET *pkt);
178__owur MSG_PROCESS_RETURN tls_process_client_rpk(SSL_CONNECTION *sc,
179 PACKET *pkt);
180__owur unsigned long tls_output_rpk(SSL_CONNECTION *sc, WPACKET *pkt,
181 CERT_PKEY *cpk);
182__owur int tls_process_rpk(SSL_CONNECTION *s, PACKET *pkt, EVP_PKEY **peer_rpk);
183__owur MSG_PROCESS_RETURN tls_process_server_certificate(SSL_CONNECTION *s,
184 PACKET *pkt);
185__owur WORK_STATE tls_post_process_server_certificate(SSL_CONNECTION *s,
186 WORK_STATE wst);
187#ifndef OPENSSL_NO_COMP_ALG
188__owur MSG_PROCESS_RETURN tls_process_server_compressed_certificate(SSL_CONNECTION *sc,
189 PACKET *pkt);
190#endif
191__owur int ssl3_check_cert_and_algorithm(SSL_CONNECTION *s);
192#ifndef OPENSSL_NO_NEXTPROTONEG
193__owur CON_FUNC_RETURN tls_construct_next_proto(SSL_CONNECTION *s, WPACKET *pkt);
194#endif
195__owur MSG_PROCESS_RETURN tls_process_hello_req(SSL_CONNECTION *s, PACKET *pkt);
196__owur MSG_PROCESS_RETURN dtls_process_hello_verify(SSL_CONNECTION *s, PACKET *pkt);
197__owur CON_FUNC_RETURN tls_construct_end_of_early_data(SSL_CONNECTION *s,
198 WPACKET *pkt);
199
200/* some server-only functions */
201__owur MSG_PROCESS_RETURN tls_process_client_hello(SSL_CONNECTION *s,
202 PACKET *pkt);
203__owur WORK_STATE tls_post_process_client_hello(SSL_CONNECTION *s,
204 WORK_STATE wst);
205__owur CON_FUNC_RETURN tls_construct_server_hello(SSL_CONNECTION *s,
206 WPACKET *pkt);
207__owur CON_FUNC_RETURN dtls_construct_hello_verify_request(SSL_CONNECTION *s,
208 WPACKET *pkt);
209__owur CON_FUNC_RETURN tls_construct_server_certificate(SSL_CONNECTION *s,
210 WPACKET *pkt);
211#ifndef OPENSSL_NO_COMP_ALG
212__owur CON_FUNC_RETURN tls_construct_server_compressed_certificate(SSL_CONNECTION *sc,
213 WPACKET *pkt);
214#endif
215__owur CON_FUNC_RETURN tls_construct_server_key_exchange(SSL_CONNECTION *s,
216 WPACKET *pkt);
217__owur CON_FUNC_RETURN tls_construct_certificate_request(SSL_CONNECTION *s,
218 WPACKET *pkt);
219__owur CON_FUNC_RETURN tls_construct_server_done(SSL_CONNECTION *s,
220 WPACKET *pkt);
221__owur MSG_PROCESS_RETURN tls_process_client_certificate(SSL_CONNECTION *s,
222 PACKET *pkt);
223#ifndef OPENSSL_NO_COMP_ALG
224__owur MSG_PROCESS_RETURN tls_process_client_compressed_certificate(SSL_CONNECTION *sc,
225 PACKET *pkt);
226#endif
227__owur MSG_PROCESS_RETURN tls_process_client_key_exchange(SSL_CONNECTION *s,
228 PACKET *pkt);
229__owur WORK_STATE tls_post_process_client_key_exchange(SSL_CONNECTION *s,
230 WORK_STATE wst);
231__owur MSG_PROCESS_RETURN tls_process_cert_verify(SSL_CONNECTION *s,
232 PACKET *pkt);
233#ifndef OPENSSL_NO_NEXTPROTONEG
234__owur MSG_PROCESS_RETURN tls_process_next_proto(SSL_CONNECTION *s,
235 PACKET *pkt);
236#endif
237__owur CON_FUNC_RETURN tls_construct_new_session_ticket(SSL_CONNECTION *s,
238 WPACKET *pkt);
239MSG_PROCESS_RETURN tls_process_end_of_early_data(SSL_CONNECTION *s,
240 PACKET *pkt);
241
242#ifndef OPENSSL_NO_GOST
243/* These functions are used in GOST18 CKE, both for client and server */
244int ossl_gost18_cke_cipher_nid(const SSL_CONNECTION *s);
245int ossl_gost_ukm(const SSL_CONNECTION *s, unsigned char *dgst_buf);
246#endif
247
248/* Extension processing */
249
250typedef enum ext_return_en {
251 EXT_RETURN_FAIL,
252 EXT_RETURN_SENT,
253 EXT_RETURN_NOT_SENT
254} EXT_RETURN;
255
256__owur int tls_validate_all_contexts(SSL_CONNECTION *s, unsigned int thisctx,
257 RAW_EXTENSION *exts);
258__owur int extension_is_relevant(SSL_CONNECTION *s, unsigned int extctx,
259 unsigned int thisctx);
260__owur int tls_collect_extensions(SSL_CONNECTION *s, PACKET *packet,
261 unsigned int context,
262 RAW_EXTENSION **res, size_t *len, int init);
263__owur int tls_parse_extension(SSL_CONNECTION *s, TLSEXT_INDEX idx, int context,
264 RAW_EXTENSION *exts, X509 *x, size_t chainidx);
265__owur int tls_parse_all_extensions(SSL_CONNECTION *s, int context,
266 RAW_EXTENSION *exts,
267 X509 *x, size_t chainidx, int fin);
268__owur int should_add_extension(SSL_CONNECTION *s, unsigned int extctx,
269 unsigned int thisctx, int max_version);
270__owur int tls_construct_extensions(SSL_CONNECTION *s, WPACKET *pkt,
271 unsigned int context,
272 X509 *x, size_t chainidx);
273
274__owur int tls_psk_do_binder(SSL_CONNECTION *s, const EVP_MD *md,
275 const unsigned char *msgstart,
276 size_t binderoffset, const unsigned char *binderin,
277 unsigned char *binderout,
278 SSL_SESSION *sess, int sign, int external);
279
280/* Server Extension processing */
281int tls_parse_ctos_renegotiate(SSL_CONNECTION *s, PACKET *pkt,
282 unsigned int context,
283 X509 *x, size_t chainidx);
284int tls_parse_ctos_server_name(SSL_CONNECTION *s, PACKET *pkt,
285 unsigned int context,
286 X509 *x, size_t chainidx);
287int tls_parse_ctos_maxfragmentlen(SSL_CONNECTION *s, PACKET *pkt,
288 unsigned int context,
289 X509 *x, size_t chainidx);
290#ifndef OPENSSL_NO_SRP
291int tls_parse_ctos_srp(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
292 X509 *x, size_t chainidx);
293#endif
294int tls_parse_ctos_early_data(SSL_CONNECTION *s, PACKET *pkt,
295 unsigned int context,
296 X509 *x, size_t chainidx);
297int tls_parse_ctos_ec_pt_formats(SSL_CONNECTION *s, PACKET *pkt,
298 unsigned int context,
299 X509 *x, size_t chainidx);
300int tls_parse_ctos_supported_groups(SSL_CONNECTION *s, PACKET *pkt,
301 unsigned int context,
302 X509 *x, size_t chainidxl);
303int tls_parse_ctos_session_ticket(SSL_CONNECTION *s, PACKET *pkt,
304 unsigned int context,
305 X509 *x, size_t chainidx);
306int tls_parse_ctos_sig_algs_cert(SSL_CONNECTION *s, PACKET *pkt,
307 unsigned int context,
308 X509 *x, size_t chainidx);
309int tls_parse_ctos_sig_algs(SSL_CONNECTION *s, PACKET *pkt,
310 unsigned int context, X509 *x, size_t chainidx);
311#ifndef OPENSSL_NO_OCSP
312int tls_parse_ctos_status_request(SSL_CONNECTION *s, PACKET *pkt,
313 unsigned int context,
314 X509 *x, size_t chainidx);
315#endif
316#ifndef OPENSSL_NO_NEXTPROTONEG
317int tls_parse_ctos_npn(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
318 X509 *x, size_t chainidx);
319#endif
320int tls_parse_ctos_alpn(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
321 X509 *x, size_t chainidx);
322#ifndef OPENSSL_NO_SRTP
323int tls_parse_ctos_use_srtp(SSL_CONNECTION *s, PACKET *pkt,
324 unsigned int context, X509 *x, size_t chainidx);
325#endif
326int tls_parse_ctos_etm(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
327 X509 *x, size_t chainidx);
328int tls_parse_ctos_key_share(SSL_CONNECTION *s, PACKET *pkt,
329 unsigned int context, X509 *x, size_t chainidx);
330int tls_parse_ctos_cookie(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
331 X509 *x, size_t chainidx);
332int tls_parse_ctos_ems(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
333 X509 *x, size_t chainidx);
334int tls_parse_ctos_psk_kex_modes(SSL_CONNECTION *s, PACKET *pkt,
335 unsigned int context,
336 X509 *x, size_t chainidx);
337int tls_parse_ctos_psk(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
338 X509 *x, size_t chainidx);
339int tls_parse_ctos_post_handshake_auth(SSL_CONNECTION *, PACKET *pkt,
340 unsigned int context,
341 X509 *x, size_t chainidx);
342
343EXT_RETURN tls_construct_stoc_renegotiate(SSL_CONNECTION *s, WPACKET *pkt,
344 unsigned int context, X509 *x,
345 size_t chainidx);
346EXT_RETURN tls_construct_stoc_server_name(SSL_CONNECTION *s, WPACKET *pkt,
347 unsigned int context, X509 *x,
348 size_t chainidx);
349EXT_RETURN tls_construct_stoc_early_data(SSL_CONNECTION *s, WPACKET *pkt,
350 unsigned int context, X509 *x,
351 size_t chainidx);
352EXT_RETURN tls_construct_stoc_maxfragmentlen(SSL_CONNECTION *s, WPACKET *pkt,
353 unsigned int context, X509 *x,
354 size_t chainidx);
355EXT_RETURN tls_construct_stoc_ec_pt_formats(SSL_CONNECTION *s, WPACKET *pkt,
356 unsigned int context, X509 *x,
357 size_t chainidx);
358EXT_RETURN tls_construct_stoc_supported_groups(SSL_CONNECTION *s, WPACKET *pkt,
359 unsigned int context, X509 *x,
360 size_t chainidx);
361EXT_RETURN tls_construct_stoc_session_ticket(SSL_CONNECTION *s, WPACKET *pkt,
362 unsigned int context, X509 *x,
363 size_t chainidx);
364#ifndef OPENSSL_NO_OCSP
365EXT_RETURN tls_construct_stoc_status_request(SSL_CONNECTION *s, WPACKET *pkt,
366 unsigned int context, X509 *x,
367 size_t chainidx);
368#endif
369#ifndef OPENSSL_NO_NEXTPROTONEG
370EXT_RETURN tls_construct_stoc_next_proto_neg(SSL_CONNECTION *s, WPACKET *pkt,
371 unsigned int context, X509 *x,
372 size_t chainidx);
373#endif
374EXT_RETURN tls_construct_stoc_alpn(SSL_CONNECTION *s, WPACKET *pkt,
375 unsigned int context,
376 X509 *x, size_t chainidx);
377#ifndef OPENSSL_NO_SRTP
378EXT_RETURN tls_construct_stoc_use_srtp(SSL_CONNECTION *s, WPACKET *pkt,
379 unsigned int context,
380 X509 *x, size_t chainidx);
381#endif
382EXT_RETURN tls_construct_stoc_etm(SSL_CONNECTION *s, WPACKET *pkt,
383 unsigned int context,
384 X509 *x, size_t chainidx);
385EXT_RETURN tls_construct_stoc_ems(SSL_CONNECTION *s, WPACKET *pkt,
386 unsigned int context,
387 X509 *x, size_t chainidx);
388EXT_RETURN tls_construct_stoc_supported_versions(SSL_CONNECTION *s, WPACKET *pkt,
389 unsigned int context, X509 *x,
390 size_t chainidx);
391EXT_RETURN tls_construct_stoc_key_share(SSL_CONNECTION *s, WPACKET *pkt,
392 unsigned int context, X509 *x,
393 size_t chainidx);
394EXT_RETURN tls_construct_stoc_cookie(SSL_CONNECTION *s, WPACKET *pkt,
395 unsigned int context,
396 X509 *x, size_t chainidx);
397/*
398 * Not in public headers as this is not an official extension. Only used when
399 * SSL_OP_CRYPTOPRO_TLSEXT_BUG is set.
400 */
401#define TLSEXT_TYPE_cryptopro_bug 0xfde8
402EXT_RETURN tls_construct_stoc_cryptopro_bug(SSL_CONNECTION *s, WPACKET *pkt,
403 unsigned int context, X509 *x,
404 size_t chainidx);
405EXT_RETURN tls_construct_stoc_psk(SSL_CONNECTION *s, WPACKET *pkt,
406 unsigned int context,
407 X509 *x, size_t chainidx);
408
409/* Client Extension processing */
410EXT_RETURN tls_construct_ctos_renegotiate(SSL_CONNECTION *s, WPACKET *pkt,
411 unsigned int context,
412 X509 *x, size_t chainidx);
413EXT_RETURN tls_construct_ctos_server_name(SSL_CONNECTION *s, WPACKET *pkt,
414 unsigned int context,
415 X509 *x, size_t chainidx);
416EXT_RETURN tls_construct_ctos_maxfragmentlen(SSL_CONNECTION *s, WPACKET *pkt,
417 unsigned int context,
418 X509 *x, size_t chainidx);
419#ifndef OPENSSL_NO_SRP
420EXT_RETURN tls_construct_ctos_srp(SSL_CONNECTION *s, WPACKET *pkt,
421 unsigned int context, X509 *x,
422 size_t chainidx);
423#endif
424EXT_RETURN tls_construct_ctos_ec_pt_formats(SSL_CONNECTION *s, WPACKET *pkt,
425 unsigned int context, X509 *x,
426 size_t chainidx);
427EXT_RETURN tls_construct_ctos_supported_groups(SSL_CONNECTION *s, WPACKET *pkt,
428 unsigned int context, X509 *x,
429 size_t chainidx);
430
431EXT_RETURN tls_construct_ctos_early_data(SSL_CONNECTION *s, WPACKET *pkt,
432 unsigned int context, X509 *x,
433 size_t chainidx);
434EXT_RETURN tls_construct_ctos_session_ticket(SSL_CONNECTION *s, WPACKET *pkt,
435 unsigned int context, X509 *x,
436 size_t chainidx);
437EXT_RETURN tls_construct_ctos_sig_algs(SSL_CONNECTION *s, WPACKET *pkt,
438 unsigned int context, X509 *x,
439 size_t chainidx);
440#ifndef OPENSSL_NO_OCSP
441EXT_RETURN tls_construct_ctos_status_request(SSL_CONNECTION *s, WPACKET *pkt,
442 unsigned int context, X509 *x,
443 size_t chainidx);
444#endif
445#ifndef OPENSSL_NO_NEXTPROTONEG
446EXT_RETURN tls_construct_ctos_npn(SSL_CONNECTION *s, WPACKET *pkt,
447 unsigned int context,
448 X509 *x, size_t chainidx);
449#endif
450EXT_RETURN tls_construct_ctos_alpn(SSL_CONNECTION *s, WPACKET *pkt,
451 unsigned int context,
452 X509 *x, size_t chainidx);
453#ifndef OPENSSL_NO_SRTP
454EXT_RETURN tls_construct_ctos_use_srtp(SSL_CONNECTION *s, WPACKET *pkt,
455 unsigned int context,
456 X509 *x, size_t chainidx);
457#endif
458EXT_RETURN tls_construct_ctos_etm(SSL_CONNECTION *s, WPACKET *pkt,
459 unsigned int context,
460 X509 *x, size_t chainidx);
461#ifndef OPENSSL_NO_CT
462EXT_RETURN tls_construct_ctos_sct(SSL_CONNECTION *s, WPACKET *pkt,
463 unsigned int context,
464 X509 *x, size_t chainidx);
465#endif
466EXT_RETURN tls_construct_ctos_ems(SSL_CONNECTION *s, WPACKET *pkt,
467 unsigned int context,
468 X509 *x, size_t chainidx);
469EXT_RETURN tls_construct_ctos_supported_versions(SSL_CONNECTION *s, WPACKET *pkt,
470 unsigned int context, X509 *x,
471 size_t chainidx);
472EXT_RETURN tls_construct_ctos_key_share(SSL_CONNECTION *s, WPACKET *pkt,
473 unsigned int context, X509 *x,
474 size_t chainidx);
475EXT_RETURN tls_construct_ctos_psk_kex_modes(SSL_CONNECTION *s, WPACKET *pkt,
476 unsigned int context, X509 *x,
477 size_t chainidx);
478EXT_RETURN tls_construct_ctos_cookie(SSL_CONNECTION *s, WPACKET *pkt,
479 unsigned int context,
480 X509 *x, size_t chainidx);
481EXT_RETURN tls_construct_ctos_padding(SSL_CONNECTION *s, WPACKET *pkt,
482 unsigned int context, X509 *x,
483 size_t chainidx);
484EXT_RETURN tls_construct_ctos_psk(SSL_CONNECTION *s, WPACKET *pkt,
485 unsigned int context,
486 X509 *x, size_t chainidx);
487EXT_RETURN tls_construct_ctos_post_handshake_auth(SSL_CONNECTION *s, WPACKET *pkt,
488 unsigned int context,
489 X509 *x, size_t chainidx);
490
491int tls_parse_stoc_renegotiate(SSL_CONNECTION *s, PACKET *pkt,
492 unsigned int context,
493 X509 *x, size_t chainidx);
494int tls_parse_stoc_server_name(SSL_CONNECTION *s, PACKET *pkt,
495 unsigned int context,
496 X509 *x, size_t chainidx);
497int tls_parse_stoc_early_data(SSL_CONNECTION *s, PACKET *pkt,
498 unsigned int context,
499 X509 *x, size_t chainidx);
500int tls_parse_stoc_maxfragmentlen(SSL_CONNECTION *s, PACKET *pkt,
501 unsigned int context,
502 X509 *x, size_t chainidx);
503int tls_parse_stoc_ec_pt_formats(SSL_CONNECTION *s, PACKET *pkt,
504 unsigned int context,
505 X509 *x, size_t chainidx);
506int tls_parse_stoc_session_ticket(SSL_CONNECTION *s, PACKET *pkt,
507 unsigned int context,
508 X509 *x, size_t chainidx);
509#ifndef OPENSSL_NO_OCSP
510int tls_parse_stoc_status_request(SSL_CONNECTION *s, PACKET *pkt,
511 unsigned int context,
512 X509 *x, size_t chainidx);
513#endif
514#ifndef OPENSSL_NO_CT
515int tls_parse_stoc_sct(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
516 X509 *x, size_t chainidx);
517#endif
518#ifndef OPENSSL_NO_NEXTPROTONEG
519int tls_parse_stoc_npn(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
520 X509 *x, size_t chainidx);
521#endif
522int tls_parse_stoc_alpn(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
523 X509 *x, size_t chainidx);
524#ifndef OPENSSL_NO_SRTP
525int tls_parse_stoc_use_srtp(SSL_CONNECTION *s, PACKET *pkt,
526 unsigned int context, X509 *x, size_t chainidx);
527#endif
528int tls_parse_stoc_etm(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
529 X509 *x, size_t chainidx);
530int tls_parse_stoc_ems(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
531 X509 *x, size_t chainidx);
532int tls_parse_stoc_supported_versions(SSL_CONNECTION *s, PACKET *pkt,
533 unsigned int context,
534 X509 *x, size_t chainidx);
535int tls_parse_stoc_key_share(SSL_CONNECTION *s, PACKET *pkt,
536 unsigned int context, X509 *x, size_t chainidx);
537int tls_parse_stoc_cookie(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
538 X509 *x, size_t chainidx);
539int tls_parse_stoc_psk(SSL_CONNECTION *s, PACKET *pkt, unsigned int context,
540 X509 *x, size_t chainidx);
541
542int tls_handle_alpn(SSL_CONNECTION *s);
543
544int tls13_save_handshake_digest_for_pha(SSL_CONNECTION *s);
545int tls13_restore_handshake_digest_for_pha(SSL_CONNECTION *s);
546
547__owur EVP_PKEY* tls_get_peer_pkey(const SSL_CONNECTION *sc);
548/* RFC7250 */
549EXT_RETURN tls_construct_ctos_client_cert_type(SSL_CONNECTION *sc, WPACKET *pkt,
550 unsigned int context,
551 X509 *x, size_t chainidx);
552EXT_RETURN tls_construct_stoc_client_cert_type(SSL_CONNECTION *sc, WPACKET *pkt,
553 unsigned int context,
554 X509 *x, size_t chainidx);
555int tls_parse_ctos_client_cert_type(SSL_CONNECTION *sc, PACKET *pkt,
556 unsigned int context,
557 X509 *x, size_t chainidx);
558int tls_parse_stoc_client_cert_type(SSL_CONNECTION *sc, PACKET *pkt,
559 unsigned int context,
560 X509 *x, size_t chainidx);
561EXT_RETURN tls_construct_ctos_server_cert_type(SSL_CONNECTION *sc, WPACKET *pkt,
562 unsigned int context,
563 X509 *x, size_t chainidx);
564EXT_RETURN tls_construct_stoc_server_cert_type(SSL_CONNECTION *sc, WPACKET *pkt,
565 unsigned int context,
566 X509 *x, size_t chainidx);
567int tls_parse_ctos_server_cert_type(SSL_CONNECTION *sc, PACKET *pkt,
568 unsigned int context,
569 X509 *x, size_t chainidx);
570int tls_parse_stoc_server_cert_type(SSL_CONNECTION *s, PACKET *pkt,
571 unsigned int context,
572 X509 *x, size_t chainidx);
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette