diff options
Diffstat (limited to 'src/lib/libssl/ssl2.h')
| -rw-r--r-- | src/lib/libssl/ssl2.h | 25 | 
1 files changed, 14 insertions, 11 deletions
| diff --git a/src/lib/libssl/ssl2.h b/src/lib/libssl/ssl2.h index 3dc94e520b..99a52ea0dd 100644 --- a/src/lib/libssl/ssl2.h +++ b/src/lib/libssl/ssl2.h | |||
| @@ -67,8 +67,8 @@ extern "C" { | |||
| 67 | #define SSL2_VERSION 0x0002 | 67 | #define SSL2_VERSION 0x0002 | 
| 68 | #define SSL2_VERSION_MAJOR 0x00 | 68 | #define SSL2_VERSION_MAJOR 0x00 | 
| 69 | #define SSL2_VERSION_MINOR 0x02 | 69 | #define SSL2_VERSION_MINOR 0x02 | 
| 70 | #define SSL2_CLIENT_VERSION 0x0002 | 70 | /* #define SSL2_CLIENT_VERSION 0x0002 */ | 
| 71 | #define SSL2_SERVER_VERSION 0x0002 | 71 | /* #define SSL2_SERVER_VERSION 0x0002 */ | 
| 72 | 72 | ||
| 73 | /* Protocol Message Codes */ | 73 | /* Protocol Message Codes */ | 
| 74 | #define SSL2_MT_ERROR 0 | 74 | #define SSL2_MT_ERROR 0 | 
| @@ -133,8 +133,12 @@ extern "C" { | |||
| 133 | 133 | ||
| 134 | /* Upper/Lower Bounds */ | 134 | /* Upper/Lower Bounds */ | 
| 135 | #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 | 135 | #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 | 
| 136 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)32767 | 136 | #ifdef OPENSSL_SYS_MPE | 
| 137 | #define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /**/ | 137 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 29998u | 
| 138 | #else | ||
| 139 | #define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 32767u /* 2^15-1 */ | ||
| 140 | #endif | ||
| 141 | #define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /* 2^14-1 */ | ||
| 138 | 142 | ||
| 139 | #define SSL2_CHALLENGE_LENGTH 16 | 143 | #define SSL2_CHALLENGE_LENGTH 16 | 
| 140 | /*#define SSL2_CHALLENGE_LENGTH 32 */ | 144 | /*#define SSL2_CHALLENGE_LENGTH 32 */ | 
| @@ -151,7 +155,7 @@ extern "C" { | |||
| 151 | #define CERT char | 155 | #define CERT char | 
| 152 | #endif | 156 | #endif | 
| 153 | 157 | ||
| 154 | typedef struct ssl2_ctx_st | 158 | typedef struct ssl2_state_st | 
| 155 | { | 159 | { | 
| 156 | int three_byte_header; | 160 | int three_byte_header; | 
| 157 | int clear_text; /* clear text */ | 161 | int clear_text; /* clear text */ | 
| @@ -162,7 +166,7 @@ typedef struct ssl2_ctx_st | |||
| 162 | * args were passwd */ | 166 | * args were passwd */ | 
| 163 | unsigned int wnum; /* number of bytes sent so far */ | 167 | unsigned int wnum; /* number of bytes sent so far */ | 
| 164 | int wpend_tot; | 168 | int wpend_tot; | 
| 165 | char *wpend_buf; | 169 | const unsigned char *wpend_buf; | 
| 166 | 170 | ||
| 167 | int wpend_off; /* offset to data to write */ | 171 | int wpend_off; /* offset to data to write */ | 
| 168 | int wpend_len; /* number of bytes passwd to write */ | 172 | int wpend_len; /* number of bytes passwd to write */ | 
| @@ -185,7 +189,6 @@ typedef struct ssl2_ctx_st | |||
| 185 | unsigned char *ract_data; | 189 | unsigned char *ract_data; | 
| 186 | unsigned char *wact_data; | 190 | unsigned char *wact_data; | 
| 187 | unsigned char *mac_data; | 191 | unsigned char *mac_data; | 
| 188 | unsigned char *pad_data; | ||
| 189 | 192 | ||
| 190 | unsigned char *read_key; | 193 | unsigned char *read_key; | 
| 191 | unsigned char *write_key; | 194 | unsigned char *write_key; | 
| @@ -205,16 +208,16 @@ typedef struct ssl2_ctx_st | |||
| 205 | unsigned int conn_id_length; | 208 | unsigned int conn_id_length; | 
| 206 | unsigned int cert_type; | 209 | unsigned int cert_type; | 
| 207 | unsigned int cert_length; | 210 | unsigned int cert_length; | 
| 208 | int csl; | 211 | unsigned int csl; | 
| 209 | int clear; | 212 | unsigned int clear; | 
| 210 | unsigned int enc; | 213 | unsigned int enc; | 
| 211 | unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH]; | 214 | unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH]; | 
| 212 | int cipher_spec_length; | 215 | unsigned int cipher_spec_length; | 
| 213 | unsigned int session_id_length; | 216 | unsigned int session_id_length; | 
| 214 | unsigned int clen; | 217 | unsigned int clen; | 
| 215 | unsigned int rlen; | 218 | unsigned int rlen; | 
| 216 | } tmp; | 219 | } tmp; | 
| 217 | } SSL2_CTX; | 220 | } SSL2_STATE; | 
| 218 | 221 | ||
| 219 | /* SSLv2 */ | 222 | /* SSLv2 */ | 
| 220 | /* client */ | 223 | /* client */ | 
