X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl2.h;h=eb25dcb0bf569f42361c3f28eee29d4b97832172;hp=95e8231dfcbfc3388d2f899fbee9906fb98b7381;hb=f04665a653665cd6432b9adfeb7c7f12a7447d26;hpb=6d02d8e444f57d96465642b07233ed41801a3a75 diff --git a/ssl/ssl2.h b/ssl/ssl2.h index 95e8231dfc..eb25dcb0bf 100644 --- a/ssl/ssl2.h +++ b/ssl/ssl2.h @@ -133,8 +133,12 @@ extern "C" { /* Upper/Lower Bounds */ #define SSL2_MAX_MASTER_KEY_LENGTH_IN_BITS 256 -#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER (unsigned int)32767 -#define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /**/ +#ifdef OPENSSL_SYS_MPE +#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 29998u +#else +#define SSL2_MAX_RECORD_LENGTH_2_BYTE_HEADER 32767u /* 2^15-1 */ +#endif +#define SSL2_MAX_RECORD_LENGTH_3_BYTE_HEADER 16383 /* 2^14-1 */ #define SSL2_CHALLENGE_LENGTH 16 /*#define SSL2_CHALLENGE_LENGTH 32 */ @@ -151,7 +155,9 @@ extern "C" { #define CERT char #endif -typedef struct ssl2_ctx_st +#ifndef OPENSSL_NO_SSL_INTERN + +typedef struct ssl2_state_st { int three_byte_header; int clear_text; /* clear text */ @@ -162,7 +168,7 @@ typedef struct ssl2_ctx_st * args were passwd */ unsigned int wnum; /* number of bytes sent so far */ int wpend_tot; - char *wpend_buf; + const unsigned char *wpend_buf; int wpend_off; /* offset to data to write */ int wpend_len; /* number of bytes passwd to write */ @@ -185,7 +191,6 @@ typedef struct ssl2_ctx_st unsigned char *ract_data; unsigned char *wact_data; unsigned char *mac_data; - unsigned char *pad_data; unsigned char *read_key; unsigned char *write_key; @@ -205,16 +210,18 @@ typedef struct ssl2_ctx_st unsigned int conn_id_length; unsigned int cert_type; unsigned int cert_length; - int csl; - int clear; + unsigned int csl; + unsigned int clear; unsigned int enc; unsigned char ccl[SSL2_MAX_CERT_CHALLENGE_LENGTH]; - int cipher_spec_length; + unsigned int cipher_spec_length; unsigned int session_id_length; unsigned int clen; unsigned int rlen; } tmp; - } SSL2_CTX; + } SSL2_STATE; + +#endif /* SSLv2 */ /* client */