diff options
Diffstat (limited to 'src/lib/libssl/dtls1.h')
-rw-r--r-- | src/lib/libssl/dtls1.h | 86 |
1 files changed, 1 insertions, 85 deletions
diff --git a/src/lib/libssl/dtls1.h b/src/lib/libssl/dtls1.h index 624df2479b..7428d8ec3c 100644 --- a/src/lib/libssl/dtls1.h +++ b/src/lib/libssl/dtls1.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dtls1.h,v 1.26 2021/05/10 17:10:57 tb Exp $ */ | 1 | /* $OpenBSD: dtls1.h,v 1.27 2021/05/16 13:56:30 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -91,90 +91,6 @@ extern "C" { | |||
91 | 91 | ||
92 | #define DTLS1_AL_HEADER_LENGTH 2 | 92 | #define DTLS1_AL_HEADER_LENGTH 2 |
93 | 93 | ||
94 | #ifdef LIBRESSL_INTERNAL | ||
95 | |||
96 | typedef struct dtls1_bitmap_st { | ||
97 | unsigned long map; /* track 32 packets on 32-bit systems | ||
98 | and 64 - on 64-bit systems */ | ||
99 | unsigned char max_seq_num[8]; /* max record number seen so far, | ||
100 | 64-bit value in big-endian | ||
101 | encoding */ | ||
102 | } DTLS1_BITMAP; | ||
103 | |||
104 | struct dtls1_retransmit_state { | ||
105 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ | ||
106 | EVP_MD_CTX *write_hash; /* used for mac generation */ | ||
107 | SSL_SESSION *session; | ||
108 | unsigned short epoch; | ||
109 | }; | ||
110 | |||
111 | struct hm_header_st { | ||
112 | unsigned char type; | ||
113 | unsigned long msg_len; | ||
114 | unsigned short seq; | ||
115 | unsigned long frag_off; | ||
116 | unsigned long frag_len; | ||
117 | unsigned int is_ccs; | ||
118 | struct dtls1_retransmit_state saved_retransmit_state; | ||
119 | }; | ||
120 | |||
121 | struct ccs_header_st { | ||
122 | unsigned char type; | ||
123 | unsigned short seq; | ||
124 | }; | ||
125 | |||
126 | struct dtls1_timeout_st { | ||
127 | /* Number of read timeouts so far */ | ||
128 | unsigned int read_timeouts; | ||
129 | |||
130 | /* Number of write timeouts so far */ | ||
131 | unsigned int write_timeouts; | ||
132 | |||
133 | /* Number of alerts received so far */ | ||
134 | unsigned int num_alerts; | ||
135 | }; | ||
136 | |||
137 | struct _pqueue; | ||
138 | |||
139 | typedef struct record_pqueue_st { | ||
140 | unsigned short epoch; | ||
141 | struct _pqueue *q; | ||
142 | } record_pqueue; | ||
143 | |||
144 | typedef struct hm_fragment_st { | ||
145 | struct hm_header_st msg_header; | ||
146 | unsigned char *fragment; | ||
147 | unsigned char *reassembly; | ||
148 | } hm_fragment; | ||
149 | |||
150 | struct dtls1_state_internal_st; | ||
151 | |||
152 | typedef struct dtls1_state_st { | ||
153 | /* Buffered (sent) handshake records */ | ||
154 | struct _pqueue *sent_messages; | ||
155 | |||
156 | /* Indicates when the last handshake msg or heartbeat sent will timeout */ | ||
157 | struct timeval next_timeout; | ||
158 | |||
159 | /* Timeout duration */ | ||
160 | unsigned short timeout_duration; | ||
161 | |||
162 | struct dtls1_state_internal_st *internal; | ||
163 | } DTLS1_STATE; | ||
164 | |||
165 | #ifndef LIBRESSL_INTERNAL | ||
166 | |||
167 | typedef struct dtls1_record_data_st { | ||
168 | unsigned char *packet; | ||
169 | unsigned int packet_length; | ||
170 | SSL3_BUFFER rbuf; | ||
171 | SSL3_RECORD rrec; | ||
172 | } DTLS1_RECORD_DATA; | ||
173 | |||
174 | #endif | ||
175 | |||
176 | #endif | ||
177 | |||
178 | /* Timeout multipliers (timeout slice is defined in apps/timeouts.h */ | 94 | /* Timeout multipliers (timeout slice is defined in apps/timeouts.h */ |
179 | #define DTLS1_TMO_READ_COUNT 2 | 95 | #define DTLS1_TMO_READ_COUNT 2 |
180 | #define DTLS1_TMO_WRITE_COUNT 2 | 96 | #define DTLS1_TMO_WRITE_COUNT 2 |