X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fssl2.h;h=99a52ea0dd990bffa6b1bcc55bc7a5ee3635306b;hp=db353f5841ab6e1165fe120f82bbe450ff428a4a;hb=d08b6b44bab929d95eae4d0ccc66f1aef0e035bc;hpb=b7896b3cb86d80206af14a14d69b0717786f2729 diff --git a/ssl/ssl2.h b/ssl/ssl2.h index db353f5841..99a52ea0dd 100644 --- a/ssl/ssl2.h +++ b/ssl/ssl2.h @@ -1,5 +1,5 @@ /* ssl/ssl2.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -64,8 +64,11 @@ extern "C" { #endif /* Protocol Version Codes */ -#define SSL2_CLIENT_VERSION 0x0002 -#define SSL2_SERVER_VERSION 0x0002 +#define SSL2_VERSION 0x0002 +#define SSL2_VERSION_MAJOR 0x00 +#define SSL2_VERSION_MINOR 0x02 +/* #define SSL2_CLIENT_VERSION 0x0002 */ +/* #define SSL2_SERVER_VERSION 0x0002 */ /* Protocol Message Codes */ #define SSL2_MT_ERROR 0 @@ -130,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 */ @@ -148,9 +155,8 @@ extern "C" { #define CERT char #endif -typedef struct ssl2_ctx_st +typedef struct ssl2_state_st { - int first_packet; /* enable first packet checking in server */ int three_byte_header; int clear_text; /* clear text */ int escape; /* not used in SSLv2 */ @@ -160,7 +166,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 */ @@ -183,7 +189,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; @@ -203,16 +208,16 @@ 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; /* SSLv2 */ /* client */