Fix ssl3_get_message handle message fragmentation correctly.
[openssl.git] / ssl / ssl3.h
index 654ad1e7d6d181fc1d5c6e8a8b2ff10b4fd2f5fb..0528588aa9f3ecfbb96f0cb229ad7a9f5531ee18 100644 (file)
@@ -59,6 +59,9 @@
 #ifndef HEADER_SSL3_H 
 #define HEADER_SSL3_H 
 
+#ifndef OPENSSL_NO_COMP
+#include <openssl/comp.h>
+#endif
 #include <openssl/buffer.h>
 #include <openssl/evp.h>
 #include <openssl/ssl.h>
@@ -102,6 +105,22 @@ extern "C" {
 #define SSL3_CK_FZA_DMS_FZA_SHA                        0x0300001D
 #define SSL3_CK_FZA_DMS_RC4_SHA                        0x0300001E
 
+/*    VRS Additional Kerberos5 entries
+ */
+#define SSL3_CK_KRB5_DES_40_CBC_SHA            0x03000021
+#define SSL3_CK_KRB5_DES_40_CBC_MD5            0x03000022
+#define SSL3_CK_KRB5_DES_64_CBC_SHA            0x03000023
+#define SSL3_CK_KRB5_DES_64_CBC_MD5            0x03000024
+#define SSL3_CK_KRB5_DES_192_CBC3_SHA          0x03000025
+#define SSL3_CK_KRB5_DES_192_CBC3_MD5          0x03000026
+
+#define SSL3_TXT_KRB5_DES_40_CBC_SHA           "EXP-KRB5-DES-CBC-SHA"
+#define SSL3_TXT_KRB5_DES_40_CBC_MD5           "EXP-KRB5-DES-CBC-MD5"
+#define SSL3_TXT_KRB5_DES_64_CBC_SHA           "KRB5-DES-CBC-SHA"
+#define SSL3_TXT_KRB5_DES_64_CBC_MD5           "KRB5-DES-CBC-MD5"
+#define SSL3_TXT_KRB5_DES_192_CBC3_SHA         "KRB5-DES-CBC3-SHA"
+#define SSL3_TXT_KRB5_DES_192_CBC3_MD5         "KRB5-DES-CBC3-MD5"
+
 #define SSL3_TXT_RSA_NULL_MD5                  "NULL-MD5"
 #define SSL3_TXT_RSA_NULL_SHA                  "NULL-SHA"
 #define SSL3_TXT_RSA_RC4_40_MD5                "EXP-RC4-MD5"
@@ -146,7 +165,8 @@ extern "C" {
 #define SSL3_RT_HEADER_LENGTH                  5
 
 /* Due to MS stuffing up, this can change.... */
-#if defined(WIN16) || (defined(MSDOS) && !defined(WIN32))
+#if defined(OPENSSL_SYS_WIN16) || \
+       (defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32))
 #define SSL3_RT_MAX_EXTRA                      (14000)
 #else
 #define SSL3_RT_MAX_EXTRA                      (16384)
@@ -240,9 +260,9 @@ typedef struct ssl3_state_st
        /* storage for Alert/Handshake protocol data received but not
         * yet processed by ssl3_read_bytes: */
        unsigned char alert_fragment[2];
-       int alert_fragment_len;
+       unsigned int alert_fragment_len;
        unsigned char handshake_fragment[4];
-       int handshake_fragment_len;
+       unsigned int handshake_fragment_len;
 
        /* partial write - check the numbers match */
        unsigned int wnum;      /* number of bytes sent so far */
@@ -289,7 +309,7 @@ typedef struct ssl3_state_st
 
                /* used to hold the new cipher we are going to use */
                SSL_CIPHER *new_cipher;
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
                DH *dh;
 #endif
                /* used when SSL_ST_FLUSH_DATA is entered */
@@ -310,7 +330,7 @@ typedef struct ssl3_state_st
 
                const EVP_CIPHER *new_sym_enc;
                const EVP_MD *new_hash;
-#ifdef HEADER_COMP_H
+#ifndef OPENSSL_NO_COMP
                const SSL_COMP *new_compression;
 #else
                char *new_compression;
@@ -365,7 +385,6 @@ typedef struct ssl3_state_st
 #define SSL3_ST_SR_CLNT_HELLO_A                (0x110|SSL_ST_ACCEPT)
 #define SSL3_ST_SR_CLNT_HELLO_B                (0x111|SSL_ST_ACCEPT)
 #define SSL3_ST_SR_CLNT_HELLO_C                (0x112|SSL_ST_ACCEPT)
-#define SSL3_ST_SR_MS_SGC                      (0x113|SSL_ST_ACCEPT)
 /* write to client */
 #define SSL3_ST_SW_HELLO_REQ_A         (0x120|SSL_ST_ACCEPT)
 #define SSL3_ST_SW_HELLO_REQ_B         (0x121|SSL_ST_ACCEPT)