diff options
author | miod <> | 2014-08-11 04:45:19 +0000 |
---|---|---|
committer | miod <> | 2014-08-11 04:45:19 +0000 |
commit | e8fa863e4a90aae1d1c2f88d7d26e9a0bd9db0dc (patch) | |
tree | 8c630bd5c5154de1e8bc89d7647bd531c4408931 /src/lib | |
parent | 9c34b1e2279d3e55444b233392f0fa825ee57037 (diff) | |
download | openbsd-e8fa863e4a90aae1d1c2f88d7d26e9a0bd9db0dc.tar.gz openbsd-e8fa863e4a90aae1d1c2f88d7d26e9a0bd9db0dc.tar.bz2 openbsd-e8fa863e4a90aae1d1c2f88d7d26e9a0bd9db0dc.zip |
Remove now-unused SSL2_STATE as well as ssl2-specific state machine values.
ok guenther@ jsing@
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/src/ssl/ssl2.h | 118 | ||||
-rw-r--r-- | src/lib/libssl/ssl2.h | 118 |
2 files changed, 2 insertions, 234 deletions
diff --git a/src/lib/libssl/src/ssl/ssl2.h b/src/lib/libssl/src/ssl/ssl2.h index 011ed2ba96..5604f89145 100644 --- a/src/lib/libssl/src/ssl/ssl2.h +++ b/src/lib/libssl/src/ssl/ssl2.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl2.h,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ | 1 | /* $OpenBSD: ssl2.h,v 1.11 2014/08/11 04:45:19 miod 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 | * |
@@ -147,122 +147,6 @@ extern "C" { | |||
147 | #define SSL2_MIN_CERT_CHALLENGE_LENGTH 16 | 147 | #define SSL2_MIN_CERT_CHALLENGE_LENGTH 16 |
148 | #define SSL2_MAX_KEY_MATERIAL_LENGTH 24 | 148 | #define SSL2_MAX_KEY_MATERIAL_LENGTH 24 |
149 | 149 | ||
150 | #ifndef HEADER_SSL_LOCL_H | ||
151 | #define CERT char | ||
152 | #endif | ||
153 | |||
154 | #ifndef OPENSSL_NO_SSL_INTERN | ||
155 | |||
156 | typedef struct ssl2_state_st { | ||
157 | int three_byte_header; | ||
158 | int clear_text; /* clear text */ | ||
159 | int escape; /* not used in SSLv2 */ | ||
160 | int ssl2_rollback; /* used if SSLv23 rolled back to SSLv2 */ | ||
161 | |||
162 | /* non-blocking io info, used to make sure the same | ||
163 | * args were passwd */ | ||
164 | unsigned int wnum; /* number of bytes sent so far */ | ||
165 | int wpend_tot; | ||
166 | const unsigned char *wpend_buf; | ||
167 | |||
168 | int wpend_off; /* offset to data to write */ | ||
169 | int wpend_len; /* number of bytes passwd to write */ | ||
170 | int wpend_ret; /* number of bytes to return to caller */ | ||
171 | |||
172 | /* buffer raw data */ | ||
173 | int rbuf_left; | ||
174 | int rbuf_offs; | ||
175 | unsigned char *rbuf; | ||
176 | unsigned char *wbuf; | ||
177 | |||
178 | unsigned char *write_ptr;/* used to point to the start due to | ||
179 | * 2/3 byte header. */ | ||
180 | |||
181 | unsigned int padding; | ||
182 | unsigned int rlength; /* passed to ssl2_enc */ | ||
183 | int ract_data_length; /* Set when things are encrypted. */ | ||
184 | unsigned int wlength; /* passed to ssl2_enc */ | ||
185 | int wact_data_length; /* Set when things are decrypted. */ | ||
186 | unsigned char *ract_data; | ||
187 | unsigned char *wact_data; | ||
188 | unsigned char *mac_data; | ||
189 | |||
190 | unsigned char *read_key; | ||
191 | unsigned char *write_key; | ||
192 | |||
193 | /* Stuff specifically to do with this SSL session */ | ||
194 | unsigned int challenge_length; | ||
195 | unsigned char challenge[SSL2_MAX_CHALLENGE_LENGTH]; | ||
196 | unsigned int conn_id_length; | ||
197 | unsigned char conn_id[SSL2_MAX_CONNECTION_ID_LENGTH]; | ||
198 | unsigned int key_material_length; | ||
199 | unsigned char key_material[SSL2_MAX_KEY_MATERIAL_LENGTH*2]; | ||
200 | |||
201 | unsigned long read_sequence; | ||
202 | unsigned long write_sequence; | ||
203 | |||
204 | struct { | ||
205 | unsigned int conn_id_length; | ||
206 | unsigned int cert_type; | ||
207 | |||
208 | unsigned int cert_length; | ||
209 | unsigned int csl; | ||
210 | |||
211 | unsigned int clear; | ||
212 | unsigned int enc; | ||
213 | |||
214 | unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH]; | ||
215 | unsigned int cipher_spec_length; | ||
216 | unsigned int session_id_length; | ||
217 | unsigned int clen; | ||
218 | unsigned int rlen; | ||
219 | } tmp; | ||
220 | } SSL2_STATE; | ||
221 | |||
222 | #endif | ||
223 | |||
224 | /* SSLv2 */ | ||
225 | /* client */ | ||
226 | #define SSL2_ST_SEND_CLIENT_HELLO_A (0x10|SSL_ST_CONNECT) | ||
227 | #define SSL2_ST_SEND_CLIENT_HELLO_B (0x11|SSL_ST_CONNECT) | ||
228 | #define SSL2_ST_GET_SERVER_HELLO_A (0x20|SSL_ST_CONNECT) | ||
229 | #define SSL2_ST_GET_SERVER_HELLO_B (0x21|SSL_ST_CONNECT) | ||
230 | #define SSL2_ST_SEND_CLIENT_MASTER_KEY_A (0x30|SSL_ST_CONNECT) | ||
231 | #define SSL2_ST_SEND_CLIENT_MASTER_KEY_B (0x31|SSL_ST_CONNECT) | ||
232 | #define SSL2_ST_SEND_CLIENT_FINISHED_A (0x40|SSL_ST_CONNECT) | ||
233 | #define SSL2_ST_SEND_CLIENT_FINISHED_B (0x41|SSL_ST_CONNECT) | ||
234 | #define SSL2_ST_SEND_CLIENT_CERTIFICATE_A (0x50|SSL_ST_CONNECT) | ||
235 | #define SSL2_ST_SEND_CLIENT_CERTIFICATE_B (0x51|SSL_ST_CONNECT) | ||
236 | #define SSL2_ST_SEND_CLIENT_CERTIFICATE_C (0x52|SSL_ST_CONNECT) | ||
237 | #define SSL2_ST_SEND_CLIENT_CERTIFICATE_D (0x53|SSL_ST_CONNECT) | ||
238 | #define SSL2_ST_GET_SERVER_VERIFY_A (0x60|SSL_ST_CONNECT) | ||
239 | #define SSL2_ST_GET_SERVER_VERIFY_B (0x61|SSL_ST_CONNECT) | ||
240 | #define SSL2_ST_GET_SERVER_FINISHED_A (0x70|SSL_ST_CONNECT) | ||
241 | #define SSL2_ST_GET_SERVER_FINISHED_B (0x71|SSL_ST_CONNECT) | ||
242 | #define SSL2_ST_CLIENT_START_ENCRYPTION (0x80|SSL_ST_CONNECT) | ||
243 | #define SSL2_ST_X509_GET_CLIENT_CERTIFICATE (0x90|SSL_ST_CONNECT) | ||
244 | /* server */ | ||
245 | #define SSL2_ST_GET_CLIENT_HELLO_A (0x10|SSL_ST_ACCEPT) | ||
246 | #define SSL2_ST_GET_CLIENT_HELLO_B (0x11|SSL_ST_ACCEPT) | ||
247 | #define SSL2_ST_GET_CLIENT_HELLO_C (0x12|SSL_ST_ACCEPT) | ||
248 | #define SSL2_ST_SEND_SERVER_HELLO_A (0x20|SSL_ST_ACCEPT) | ||
249 | #define SSL2_ST_SEND_SERVER_HELLO_B (0x21|SSL_ST_ACCEPT) | ||
250 | #define SSL2_ST_GET_CLIENT_MASTER_KEY_A (0x30|SSL_ST_ACCEPT) | ||
251 | #define SSL2_ST_GET_CLIENT_MASTER_KEY_B (0x31|SSL_ST_ACCEPT) | ||
252 | #define SSL2_ST_SEND_SERVER_VERIFY_A (0x40|SSL_ST_ACCEPT) | ||
253 | #define SSL2_ST_SEND_SERVER_VERIFY_B (0x41|SSL_ST_ACCEPT) | ||
254 | #define SSL2_ST_SEND_SERVER_VERIFY_C (0x42|SSL_ST_ACCEPT) | ||
255 | #define SSL2_ST_GET_CLIENT_FINISHED_A (0x50|SSL_ST_ACCEPT) | ||
256 | #define SSL2_ST_GET_CLIENT_FINISHED_B (0x51|SSL_ST_ACCEPT) | ||
257 | #define SSL2_ST_SEND_SERVER_FINISHED_A (0x60|SSL_ST_ACCEPT) | ||
258 | #define SSL2_ST_SEND_SERVER_FINISHED_B (0x61|SSL_ST_ACCEPT) | ||
259 | #define SSL2_ST_SEND_REQUEST_CERTIFICATE_A (0x70|SSL_ST_ACCEPT) | ||
260 | #define SSL2_ST_SEND_REQUEST_CERTIFICATE_B (0x71|SSL_ST_ACCEPT) | ||
261 | #define SSL2_ST_SEND_REQUEST_CERTIFICATE_C (0x72|SSL_ST_ACCEPT) | ||
262 | #define SSL2_ST_SEND_REQUEST_CERTIFICATE_D (0x73|SSL_ST_ACCEPT) | ||
263 | #define SSL2_ST_SERVER_START_ENCRYPTION (0x80|SSL_ST_ACCEPT) | ||
264 | #define SSL2_ST_X509_GET_SERVER_CERTIFICATE (0x90|SSL_ST_ACCEPT) | ||
265 | |||
266 | #ifdef __cplusplus | 150 | #ifdef __cplusplus |
267 | } | 151 | } |
268 | #endif | 152 | #endif |
diff --git a/src/lib/libssl/ssl2.h b/src/lib/libssl/ssl2.h index 011ed2ba96..5604f89145 100644 --- a/src/lib/libssl/ssl2.h +++ b/src/lib/libssl/ssl2.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl2.h,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ | 1 | /* $OpenBSD: ssl2.h,v 1.11 2014/08/11 04:45:19 miod 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 | * |
@@ -147,122 +147,6 @@ extern "C" { | |||
147 | #define SSL2_MIN_CERT_CHALLENGE_LENGTH 16 | 147 | #define SSL2_MIN_CERT_CHALLENGE_LENGTH 16 |
148 | #define SSL2_MAX_KEY_MATERIAL_LENGTH 24 | 148 | #define SSL2_MAX_KEY_MATERIAL_LENGTH 24 |
149 | 149 | ||
150 | #ifndef HEADER_SSL_LOCL_H | ||
151 | #define CERT char | ||
152 | #endif | ||
153 | |||
154 | #ifndef OPENSSL_NO_SSL_INTERN | ||
155 | |||
156 | typedef struct ssl2_state_st { | ||
157 | int three_byte_header; | ||
158 | int clear_text; /* clear text */ | ||
159 | int escape; /* not used in SSLv2 */ | ||
160 | int ssl2_rollback; /* used if SSLv23 rolled back to SSLv2 */ | ||
161 | |||
162 | /* non-blocking io info, used to make sure the same | ||
163 | * args were passwd */ | ||
164 | unsigned int wnum; /* number of bytes sent so far */ | ||
165 | int wpend_tot; | ||
166 | const unsigned char *wpend_buf; | ||
167 | |||
168 | int wpend_off; /* offset to data to write */ | ||
169 | int wpend_len; /* number of bytes passwd to write */ | ||
170 | int wpend_ret; /* number of bytes to return to caller */ | ||
171 | |||
172 | /* buffer raw data */ | ||
173 | int rbuf_left; | ||
174 | int rbuf_offs; | ||
175 | unsigned char *rbuf; | ||
176 | unsigned char *wbuf; | ||
177 | |||
178 | unsigned char *write_ptr;/* used to point to the start due to | ||
179 | * 2/3 byte header. */ | ||
180 | |||
181 | unsigned int padding; | ||
182 | unsigned int rlength; /* passed to ssl2_enc */ | ||
183 | int ract_data_length; /* Set when things are encrypted. */ | ||
184 | unsigned int wlength; /* passed to ssl2_enc */ | ||
185 | int wact_data_length; /* Set when things are decrypted. */ | ||
186 | unsigned char *ract_data; | ||
187 | unsigned char *wact_data; | ||
188 | unsigned char *mac_data; | ||
189 | |||
190 | unsigned char *read_key; | ||
191 | unsigned char *write_key; | ||
192 | |||
193 | /* Stuff specifically to do with this SSL session */ | ||
194 | unsigned int challenge_length; | ||
195 | unsigned char challenge[SSL2_MAX_CHALLENGE_LENGTH]; | ||
196 | unsigned int conn_id_length; | ||
197 | unsigned char conn_id[SSL2_MAX_CONNECTION_ID_LENGTH]; | ||
198 | unsigned int key_material_length; | ||
199 | unsigned char key_material[SSL2_MAX_KEY_MATERIAL_LENGTH*2]; | ||
200 | |||
201 | unsigned long read_sequence; | ||
202 | unsigned long write_sequence; | ||
203 | |||
204 | struct { | ||
205 | unsigned int conn_id_length; | ||
206 | unsigned int cert_type; | ||
207 | |||
208 | unsigned int cert_length; | ||
209 | unsigned int csl; | ||
210 | |||
211 | unsigned int clear; | ||
212 | unsigned int enc; | ||
213 | |||
214 | unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH]; | ||
215 | unsigned int cipher_spec_length; | ||
216 | unsigned int session_id_length; | ||
217 | unsigned int clen; | ||
218 | unsigned int rlen; | ||
219 | } tmp; | ||
220 | } SSL2_STATE; | ||
221 | |||
222 | #endif | ||
223 | |||
224 | /* SSLv2 */ | ||
225 | /* client */ | ||
226 | #define SSL2_ST_SEND_CLIENT_HELLO_A (0x10|SSL_ST_CONNECT) | ||
227 | #define SSL2_ST_SEND_CLIENT_HELLO_B (0x11|SSL_ST_CONNECT) | ||
228 | #define SSL2_ST_GET_SERVER_HELLO_A (0x20|SSL_ST_CONNECT) | ||
229 | #define SSL2_ST_GET_SERVER_HELLO_B (0x21|SSL_ST_CONNECT) | ||
230 | #define SSL2_ST_SEND_CLIENT_MASTER_KEY_A (0x30|SSL_ST_CONNECT) | ||
231 | #define SSL2_ST_SEND_CLIENT_MASTER_KEY_B (0x31|SSL_ST_CONNECT) | ||
232 | #define SSL2_ST_SEND_CLIENT_FINISHED_A (0x40|SSL_ST_CONNECT) | ||
233 | #define SSL2_ST_SEND_CLIENT_FINISHED_B (0x41|SSL_ST_CONNECT) | ||
234 | #define SSL2_ST_SEND_CLIENT_CERTIFICATE_A (0x50|SSL_ST_CONNECT) | ||
235 | #define SSL2_ST_SEND_CLIENT_CERTIFICATE_B (0x51|SSL_ST_CONNECT) | ||
236 | #define SSL2_ST_SEND_CLIENT_CERTIFICATE_C (0x52|SSL_ST_CONNECT) | ||
237 | #define SSL2_ST_SEND_CLIENT_CERTIFICATE_D (0x53|SSL_ST_CONNECT) | ||
238 | #define SSL2_ST_GET_SERVER_VERIFY_A (0x60|SSL_ST_CONNECT) | ||
239 | #define SSL2_ST_GET_SERVER_VERIFY_B (0x61|SSL_ST_CONNECT) | ||
240 | #define SSL2_ST_GET_SERVER_FINISHED_A (0x70|SSL_ST_CONNECT) | ||
241 | #define SSL2_ST_GET_SERVER_FINISHED_B (0x71|SSL_ST_CONNECT) | ||
242 | #define SSL2_ST_CLIENT_START_ENCRYPTION (0x80|SSL_ST_CONNECT) | ||
243 | #define SSL2_ST_X509_GET_CLIENT_CERTIFICATE (0x90|SSL_ST_CONNECT) | ||
244 | /* server */ | ||
245 | #define SSL2_ST_GET_CLIENT_HELLO_A (0x10|SSL_ST_ACCEPT) | ||
246 | #define SSL2_ST_GET_CLIENT_HELLO_B (0x11|SSL_ST_ACCEPT) | ||
247 | #define SSL2_ST_GET_CLIENT_HELLO_C (0x12|SSL_ST_ACCEPT) | ||
248 | #define SSL2_ST_SEND_SERVER_HELLO_A (0x20|SSL_ST_ACCEPT) | ||
249 | #define SSL2_ST_SEND_SERVER_HELLO_B (0x21|SSL_ST_ACCEPT) | ||
250 | #define SSL2_ST_GET_CLIENT_MASTER_KEY_A (0x30|SSL_ST_ACCEPT) | ||
251 | #define SSL2_ST_GET_CLIENT_MASTER_KEY_B (0x31|SSL_ST_ACCEPT) | ||
252 | #define SSL2_ST_SEND_SERVER_VERIFY_A (0x40|SSL_ST_ACCEPT) | ||
253 | #define SSL2_ST_SEND_SERVER_VERIFY_B (0x41|SSL_ST_ACCEPT) | ||
254 | #define SSL2_ST_SEND_SERVER_VERIFY_C (0x42|SSL_ST_ACCEPT) | ||
255 | #define SSL2_ST_GET_CLIENT_FINISHED_A (0x50|SSL_ST_ACCEPT) | ||
256 | #define SSL2_ST_GET_CLIENT_FINISHED_B (0x51|SSL_ST_ACCEPT) | ||
257 | #define SSL2_ST_SEND_SERVER_FINISHED_A (0x60|SSL_ST_ACCEPT) | ||
258 | #define SSL2_ST_SEND_SERVER_FINISHED_B (0x61|SSL_ST_ACCEPT) | ||
259 | #define SSL2_ST_SEND_REQUEST_CERTIFICATE_A (0x70|SSL_ST_ACCEPT) | ||
260 | #define SSL2_ST_SEND_REQUEST_CERTIFICATE_B (0x71|SSL_ST_ACCEPT) | ||
261 | #define SSL2_ST_SEND_REQUEST_CERTIFICATE_C (0x72|SSL_ST_ACCEPT) | ||
262 | #define SSL2_ST_SEND_REQUEST_CERTIFICATE_D (0x73|SSL_ST_ACCEPT) | ||
263 | #define SSL2_ST_SERVER_START_ENCRYPTION (0x80|SSL_ST_ACCEPT) | ||
264 | #define SSL2_ST_X509_GET_SERVER_CERTIFICATE (0x90|SSL_ST_ACCEPT) | ||
265 | |||
266 | #ifdef __cplusplus | 150 | #ifdef __cplusplus |
267 | } | 151 | } |
268 | #endif | 152 | #endif |