diff options
Diffstat (limited to 'src/lib/libssl/dtls1.h')
| -rw-r--r-- | src/lib/libssl/dtls1.h | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/src/lib/libssl/dtls1.h b/src/lib/libssl/dtls1.h index 3e0fe918a3..beb740154c 100644 --- a/src/lib/libssl/dtls1.h +++ b/src/lib/libssl/dtls1.h | |||
| @@ -100,30 +100,27 @@ extern "C" { | |||
| 100 | #define DTLS1_SCTP_AUTH_LABEL "EXPORTER_DTLS_OVER_SCTP" | 100 | #define DTLS1_SCTP_AUTH_LABEL "EXPORTER_DTLS_OVER_SCTP" |
| 101 | #endif | 101 | #endif |
| 102 | 102 | ||
| 103 | typedef struct dtls1_bitmap_st | 103 | typedef struct dtls1_bitmap_st { |
| 104 | { | ||
| 105 | unsigned long map; /* track 32 packets on 32-bit systems | 104 | unsigned long map; /* track 32 packets on 32-bit systems |
| 106 | and 64 - on 64-bit systems */ | 105 | and 64 - on 64-bit systems */ |
| 107 | unsigned char max_seq_num[8]; /* max record number seen so far, | 106 | unsigned char max_seq_num[8]; /* max record number seen so far, |
| 108 | 64-bit value in big-endian | 107 | 64-bit value in big-endian |
| 109 | encoding */ | 108 | encoding */ |
| 110 | } DTLS1_BITMAP; | 109 | } DTLS1_BITMAP; |
| 111 | 110 | ||
| 112 | struct dtls1_retransmit_state | 111 | struct dtls1_retransmit_state { |
| 113 | { | ||
| 114 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ | 112 | EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */ |
| 115 | EVP_MD_CTX *write_hash; /* used for mac generation */ | 113 | EVP_MD_CTX *write_hash; /* used for mac generation */ |
| 116 | #ifndef OPENSSL_NO_COMP | 114 | #ifndef OPENSSL_NO_COMP |
| 117 | COMP_CTX *compress; /* compression */ | 115 | COMP_CTX *compress; /* compression */ |
| 118 | #else | 116 | #else |
| 119 | char *compress; | 117 | char *compress; |
| 120 | #endif | 118 | #endif |
| 121 | SSL_SESSION *session; | 119 | SSL_SESSION *session; |
| 122 | unsigned short epoch; | 120 | unsigned short epoch; |
| 123 | }; | 121 | }; |
| 124 | 122 | ||
| 125 | struct hm_header_st | 123 | struct hm_header_st { |
| 126 | { | ||
| 127 | unsigned char type; | 124 | unsigned char type; |
| 128 | unsigned long msg_len; | 125 | unsigned long msg_len; |
| 129 | unsigned short seq; | 126 | unsigned short seq; |
| @@ -131,41 +128,36 @@ struct hm_header_st | |||
| 131 | unsigned long frag_len; | 128 | unsigned long frag_len; |
| 132 | unsigned int is_ccs; | 129 | unsigned int is_ccs; |
| 133 | struct dtls1_retransmit_state saved_retransmit_state; | 130 | struct dtls1_retransmit_state saved_retransmit_state; |
| 134 | }; | 131 | }; |
| 135 | 132 | ||
| 136 | struct ccs_header_st | 133 | struct ccs_header_st { |
| 137 | { | ||
| 138 | unsigned char type; | 134 | unsigned char type; |
| 139 | unsigned short seq; | 135 | unsigned short seq; |
| 140 | }; | 136 | }; |
| 141 | 137 | ||
| 142 | struct dtls1_timeout_st | 138 | struct dtls1_timeout_st { |
| 143 | { | ||
| 144 | /* Number of read timeouts so far */ | 139 | /* Number of read timeouts so far */ |
| 145 | unsigned int read_timeouts; | 140 | unsigned int read_timeouts; |
| 146 | 141 | ||
| 147 | /* Number of write timeouts so far */ | 142 | /* Number of write timeouts so far */ |
| 148 | unsigned int write_timeouts; | 143 | unsigned int write_timeouts; |
| 149 | 144 | ||
| 150 | /* Number of alerts received so far */ | 145 | /* Number of alerts received so far */ |
| 151 | unsigned int num_alerts; | 146 | unsigned int num_alerts; |
| 152 | }; | 147 | }; |
| 153 | 148 | ||
| 154 | typedef struct record_pqueue_st | 149 | typedef struct record_pqueue_st { |
| 155 | { | ||
| 156 | unsigned short epoch; | 150 | unsigned short epoch; |
| 157 | pqueue q; | 151 | pqueue q; |
| 158 | } record_pqueue; | 152 | } record_pqueue; |
| 159 | 153 | ||
| 160 | typedef struct hm_fragment_st | 154 | typedef struct hm_fragment_st { |
| 161 | { | ||
| 162 | struct hm_header_st msg_header; | 155 | struct hm_header_st msg_header; |
| 163 | unsigned char *fragment; | 156 | unsigned char *fragment; |
| 164 | unsigned char *reassembly; | 157 | unsigned char *reassembly; |
| 165 | } hm_fragment; | 158 | } hm_fragment; |
| 166 | 159 | ||
| 167 | typedef struct dtls1_state_st | 160 | typedef struct dtls1_state_st { |
| 168 | { | ||
| 169 | unsigned int send_cookie; | 161 | unsigned int send_cookie; |
| 170 | unsigned char cookie[DTLS1_COOKIE_LENGTH]; | 162 | unsigned char cookie[DTLS1_COOKIE_LENGTH]; |
| 171 | unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH]; | 163 | unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH]; |
| @@ -244,10 +236,9 @@ typedef struct dtls1_state_st | |||
| 244 | int shutdown_received; | 236 | int shutdown_received; |
| 245 | #endif | 237 | #endif |
| 246 | 238 | ||
| 247 | } DTLS1_STATE; | 239 | } DTLS1_STATE; |
| 248 | 240 | ||
| 249 | typedef struct dtls1_record_data_st | 241 | typedef struct dtls1_record_data_st { |
| 250 | { | ||
| 251 | unsigned char *packet; | 242 | unsigned char *packet; |
| 252 | unsigned int packet_length; | 243 | unsigned int packet_length; |
| 253 | SSL3_BUFFER rbuf; | 244 | SSL3_BUFFER rbuf; |
| @@ -255,7 +246,7 @@ typedef struct dtls1_record_data_st | |||
| 255 | #ifndef OPENSSL_NO_SCTP | 246 | #ifndef OPENSSL_NO_SCTP |
| 256 | struct bio_dgram_sctp_rcvinfo recordinfo; | 247 | struct bio_dgram_sctp_rcvinfo recordinfo; |
| 257 | #endif | 248 | #endif |
| 258 | } DTLS1_RECORD_DATA; | 249 | } DTLS1_RECORD_DATA; |
| 259 | 250 | ||
| 260 | #endif | 251 | #endif |
| 261 | 252 | ||
| @@ -269,4 +260,3 @@ typedef struct dtls1_record_data_st | |||
| 269 | } | 260 | } |
| 270 | #endif | 261 | #endif |
| 271 | #endif | 262 | #endif |
| 272 | |||
