diff options
author | jsing <> | 2021-10-23 13:36:03 +0000 |
---|---|---|
committer | jsing <> | 2021-10-23 13:36:03 +0000 |
commit | fc467ef0c8f7ce69a78b11fce57aabbf9c78b886 (patch) | |
tree | 933fd8ce5aa09d290a07a30663a317d29bdd33c1 /src/lib/libssl/dtls_locl.h | |
parent | bdc7a9ce585075f6e573a40acd747cf572b9ef69 (diff) | |
download | openbsd-fc467ef0c8f7ce69a78b11fce57aabbf9c78b886.tar.gz openbsd-fc467ef0c8f7ce69a78b11fce57aabbf9c78b886.tar.bz2 openbsd-fc467ef0c8f7ce69a78b11fce57aabbf9c78b886.zip |
Fold DTLS1_STATE_INTERNAL into DTLS1_STATE.
Now that DTLS1_STATE is opaque, fold DTLS1_STATE_INTERNAL back into
DTLS1_STATE and remove D1I() usage.
ok tb@
Diffstat (limited to 'src/lib/libssl/dtls_locl.h')
-rw-r--r-- | src/lib/libssl/dtls_locl.h | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/src/lib/libssl/dtls_locl.h b/src/lib/libssl/dtls_locl.h index 306fab2559..3e4334bf91 100644 --- a/src/lib/libssl/dtls_locl.h +++ b/src/lib/libssl/dtls_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dtls_locl.h,v 1.8 2021/10/23 08:34:36 jsing Exp $ */ | 1 | /* $OpenBSD: dtls_locl.h,v 1.9 2021/10/23 13:36:03 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. |
@@ -124,9 +124,16 @@ typedef struct dtls1_record_data_internal_st { | |||
124 | SSL3_RECORD_INTERNAL rrec; | 124 | SSL3_RECORD_INTERNAL rrec; |
125 | } DTLS1_RECORD_DATA_INTERNAL; | 125 | } DTLS1_RECORD_DATA_INTERNAL; |
126 | 126 | ||
127 | struct dtls1_state_internal_st; | 127 | struct dtls1_state_st { |
128 | /* Buffered (sent) handshake records */ | ||
129 | struct _pqueue *sent_messages; | ||
130 | |||
131 | /* Indicates when the last handshake msg or heartbeat sent will timeout */ | ||
132 | struct timeval next_timeout; | ||
133 | |||
134 | /* Timeout duration */ | ||
135 | unsigned short timeout_duration; | ||
128 | 136 | ||
129 | typedef struct dtls1_state_internal_st { | ||
130 | unsigned int send_cookie; | 137 | unsigned int send_cookie; |
131 | unsigned char cookie[DTLS1_COOKIE_LENGTH]; | 138 | unsigned char cookie[DTLS1_COOKIE_LENGTH]; |
132 | unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH]; | 139 | unsigned char rcvd_cookie[DTLS1_COOKIE_LENGTH]; |
@@ -169,21 +176,7 @@ typedef struct dtls1_state_internal_st { | |||
169 | 176 | ||
170 | unsigned int retransmitting; | 177 | unsigned int retransmitting; |
171 | unsigned int change_cipher_spec_ok; | 178 | unsigned int change_cipher_spec_ok; |
172 | } DTLS1_STATE_INTERNAL; | 179 | }; |
173 | #define D1I(s) (s->d1->internal) | ||
174 | |||
175 | typedef struct dtls1_state_st { | ||
176 | /* Buffered (sent) handshake records */ | ||
177 | struct _pqueue *sent_messages; | ||
178 | |||
179 | /* Indicates when the last handshake msg or heartbeat sent will timeout */ | ||
180 | struct timeval next_timeout; | ||
181 | |||
182 | /* Timeout duration */ | ||
183 | unsigned short timeout_duration; | ||
184 | |||
185 | struct dtls1_state_internal_st *internal; | ||
186 | } DTLS1_STATE; | ||
187 | 180 | ||
188 | int dtls1_do_write(SSL *s, int type); | 181 | int dtls1_do_write(SSL *s, int type); |
189 | int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); | 182 | int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); |