summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_locl.h
diff options
context:
space:
mode:
authorbeck <>2017-01-22 07:16:39 +0000
committerbeck <>2017-01-22 07:16:39 +0000
commit2204d5a39055900d89c6f7fbdcc3bb37ec8070db (patch)
treec03f505a3f0822dbc7a4d9523cfde19318c0d121 /src/lib/libssl/ssl_locl.h
parent334c9196a27db4244daba48e4ba2118985c535ed (diff)
downloadopenbsd-2204d5a39055900d89c6f7fbdcc3bb37ec8070db.tar.gz
openbsd-2204d5a39055900d89c6f7fbdcc3bb37ec8070db.tar.bz2
openbsd-2204d5a39055900d89c6f7fbdcc3bb37ec8070db.zip
Move most of DTLS1_STATE to internal.
ok jsing@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r--src/lib/libssl/ssl_locl.h63
1 files changed, 62 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 805d68906a..5681167242 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_locl.h,v 1.149 2017/01/22 06:36:49 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.150 2017/01/22 07:16:39 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -449,8 +449,69 @@ typedef struct ssl3_state_internal_st {
449} SSL3_STATE_INTERNAL; 449} SSL3_STATE_INTERNAL;
450 450
451typedef struct dtls1_state_internal_st { 451typedef struct dtls1_state_internal_st {
452 unsigned int send_cookie;
453 unsigned char cookie[DTLS1_COOKIE_LENGTH];
454 unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH];
455 unsigned int cookie_len;
452 456
457 /*
458 * The current data and handshake epoch. This is initially
459 * undefined, and starts at zero once the initial handshake is
460 * completed
461 */
462 unsigned short r_epoch;
463 unsigned short w_epoch;
464
465 /* records being received in the current epoch */
466 DTLS1_BITMAP bitmap;
467
468 /* renegotiation starts a new set of sequence numbers */
469 DTLS1_BITMAP next_bitmap;
470
471 /* handshake message numbers */
472 unsigned short handshake_write_seq;
473 unsigned short next_handshake_write_seq;
474
475 unsigned short handshake_read_seq;
476
477 /* save last sequence number for retransmissions */
478 unsigned char last_write_sequence[8];
479
480 /* Received handshake records (processed and unprocessed) */
481 record_pqueue unprocessed_rcds;
482 record_pqueue processed_rcds;
483
484 /* Buffered handshake messages */
485 struct _pqueue *buffered_messages;
486
487 /* Buffered application records.
488 * Only for records between CCS and Finished
489 * to prevent either protocol violation or
490 * unnecessary message loss.
491 */
492 record_pqueue buffered_app_data;
493
494 /* Is set when listening for new connections with dtls1_listen() */
495 unsigned int listen;
496
497 unsigned int mtu; /* max DTLS packet size */
498
499 struct hm_header_st w_msg_hdr;
500 struct hm_header_st r_msg_hdr;
501
502 struct dtls1_timeout_st timeout;
503
504 /* storage for Alert/Handshake protocol data received but not
505 * yet processed by ssl3_read_bytes: */
506 unsigned char alert_fragment[DTLS1_AL_HEADER_LENGTH];
507 unsigned int alert_fragment_len;
508 unsigned char handshake_fragment[DTLS1_HM_HEADER_LENGTH];
509 unsigned int handshake_fragment_len;
510
511 unsigned int retransmitting;
512 unsigned int change_cipher_spec_ok;
453} DTLS1_STATE_INTERNAL; 513} DTLS1_STATE_INTERNAL;
514#define D1I(s) (s->d1->internal)
454 515
455typedef struct cert_pkey_st { 516typedef struct cert_pkey_st {
456 X509 *x509; 517 X509 *x509;