Update the OpenSSL EAP-FAST patch for current snapshot (20080928)
authorJouni Malinen <j@w1.fi>
Sun, 28 Sep 2008 15:06:12 +0000 (18:06 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 28 Sep 2008 15:06:12 +0000 (18:06 +0300)
This reverts the addition of ssl3_digest_cached_records() call from the
previous update (3d1aa251a3783305fe31b280bb570ce9153bd982) since OpenSSL
has apparently reverted some earlier changes that broke EAP-FAST.

patches/openssl-0.9.9-session-ticket.patch

index 3054a7a..8d195df 100644 (file)
@@ -6,10 +6,10 @@ This is based on the patch from Alexey Kobozev <akobozev@cisco.com>
 
 
 
-Index: openssl-SNAP-20080822/ssl/s3_clnt.c
+Index: openssl-SNAP-20080928/ssl/s3_clnt.c
 ===================================================================
---- openssl-SNAP-20080822.orig/ssl/s3_clnt.c
-+++ openssl-SNAP-20080822/ssl/s3_clnt.c
+--- openssl-SNAP-20080928.orig/ssl/s3_clnt.c
++++ openssl-SNAP-20080928/ssl/s3_clnt.c
 @@ -788,6 +788,20 @@ int ssl3_get_server_hello(SSL *s)
                goto f_err;
                }
@@ -45,11 +45,11 @@ Index: openssl-SNAP-20080822/ssl/s3_clnt.c
                return 1;
        /* this function is called when we really expect a Certificate
         * message, so permit appropriate message length */
-Index: openssl-SNAP-20080822/ssl/s3_srvr.c
+Index: openssl-SNAP-20080928/ssl/s3_srvr.c
 ===================================================================
---- openssl-SNAP-20080822.orig/ssl/s3_srvr.c
-+++ openssl-SNAP-20080822/ssl/s3_srvr.c
-@@ -1004,6 +1004,61 @@ int ssl3_get_client_hello(SSL *s)
+--- openssl-SNAP-20080928.orig/ssl/s3_srvr.c
++++ openssl-SNAP-20080928/ssl/s3_srvr.c
+@@ -1010,6 +1010,59 @@ int ssl3_get_client_hello(SSL *s)
                        SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_CLIENTHELLO_TLSEXT);
                        goto err;
                }
@@ -104,14 +104,12 @@ Index: openssl-SNAP-20080822/ssl/s3_srvr.c
 +
 +                      s->cipher_list = sk_SSL_CIPHER_dup(s->session->ciphers);
 +                      s->cipher_list_by_id = sk_SSL_CIPHER_dup(s->session->ciphers);
-+                      s->s3->tmp.new_cipher = pref_cipher;
-+                      ssl3_digest_cached_records(s);
 +              }
 +      }
  #endif
  
        /* Worst case, we will use the NULL compression, but if we have other
-@@ -1130,16 +1185,22 @@ int ssl3_send_server_hello(SSL *s)
+@@ -1134,16 +1187,22 @@ int ssl3_send_server_hello(SSL *s)
        unsigned char *buf;
        unsigned char *p,*d;
        int i,sl;
@@ -135,10 +133,10 @@ Index: openssl-SNAP-20080822/ssl/s3_srvr.c
                /* Do the message type and length last */
                d=p= &(buf[4]);
  
-Index: openssl-SNAP-20080822/ssl/ssl_err.c
+Index: openssl-SNAP-20080928/ssl/ssl_err.c
 ===================================================================
---- openssl-SNAP-20080822.orig/ssl/ssl_err.c
-+++ openssl-SNAP-20080822/ssl/ssl_err.c
+--- openssl-SNAP-20080928.orig/ssl/ssl_err.c
++++ openssl-SNAP-20080928/ssl/ssl_err.c
 @@ -263,6 +263,7 @@ static ERR_STRING_DATA SSL_str_functs[]=
  {ERR_FUNC(SSL_F_TLS1_PRF),    "tls1_prf"},
  {ERR_FUNC(SSL_F_TLS1_SETUP_KEY_BLOCK),        "TLS1_SETUP_KEY_BLOCK"},
@@ -147,11 +145,11 @@ Index: openssl-SNAP-20080822/ssl/ssl_err.c
  {0,NULL}
        };
  
-Index: openssl-SNAP-20080822/ssl/ssl.h
+Index: openssl-SNAP-20080928/ssl/ssl.h
 ===================================================================
---- openssl-SNAP-20080822.orig/ssl/ssl.h
-+++ openssl-SNAP-20080822/ssl/ssl.h
-@@ -354,6 +354,7 @@ extern "C" {
+--- openssl-SNAP-20080928.orig/ssl/ssl.h
++++ openssl-SNAP-20080928/ssl/ssl.h
+@@ -355,6 +355,7 @@ extern "C" {
   * 'struct ssl_st *' function parameters used to prototype callbacks
   * in SSL_CTX. */
  typedef struct ssl_st *ssl_crock_st;
@@ -159,7 +157,7 @@ Index: openssl-SNAP-20080822/ssl/ssl.h
  
  /* used to hold info on the particular ciphers used */
  typedef struct ssl_cipher_st
-@@ -377,6 +378,8 @@ typedef struct ssl_cipher_st
+@@ -378,6 +379,8 @@ typedef struct ssl_cipher_st
  
  DECLARE_STACK_OF(SSL_CIPHER)
  
@@ -168,7 +166,7 @@ Index: openssl-SNAP-20080822/ssl/ssl.h
  /* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */
  typedef struct ssl_method_st
        {
-@@ -1144,6 +1147,13 @@ struct ssl_st
+@@ -1145,6 +1148,13 @@ struct ssl_st
        void *tlsext_opaque_prf_input;
        size_t tlsext_opaque_prf_input_len;
  
@@ -182,7 +180,7 @@ Index: openssl-SNAP-20080822/ssl/ssl.h
        SSL_CTX * initial_ctx; /* initial ctx, used to store sessions */
  #define session_ctx initial_ctx
  #else
-@@ -1745,6 +1755,12 @@ void *SSL_COMP_get_compression_methods(v
+@@ -1746,6 +1756,12 @@ void *SSL_COMP_get_compression_methods(v
  int SSL_COMP_add_compression_method(int id,void *cm);
  #endif
  
@@ -195,7 +193,7 @@ Index: openssl-SNAP-20080822/ssl/ssl.h
  /* BEGIN ERROR CODES */
  /* The following lines are auto generated by the script mkerr.pl. Any changes
   * made after this point may be overwritten when the script is next run.
-@@ -1947,6 +1963,7 @@ void ERR_load_SSL_strings(void);
+@@ -1948,6 +1964,7 @@ void ERR_load_SSL_strings(void);
  #define SSL_F_TLS1_PRF                                         284
  #define SSL_F_TLS1_SETUP_KEY_BLOCK                     211
  #define SSL_F_WRITE_PENDING                            212
@@ -203,10 +201,10 @@ Index: openssl-SNAP-20080822/ssl/ssl.h
  
  /* Reason codes. */
  #define SSL_R_APP_DATA_IN_HANDSHAKE                    100
-Index: openssl-SNAP-20080822/ssl/ssl_sess.c
+Index: openssl-SNAP-20080928/ssl/ssl_sess.c
 ===================================================================
---- openssl-SNAP-20080822.orig/ssl/ssl_sess.c
-+++ openssl-SNAP-20080822/ssl/ssl_sess.c
+--- openssl-SNAP-20080928.orig/ssl/ssl_sess.c
++++ openssl-SNAP-20080928/ssl/ssl_sess.c
 @@ -834,6 +834,52 @@ long SSL_CTX_get_timeout(const SSL_CTX *
        return(s->session_timeout);
        }
@@ -260,10 +258,10 @@ Index: openssl-SNAP-20080822/ssl/ssl_sess.c
  typedef struct timeout_param_st
        {
        SSL_CTX *ctx;
-Index: openssl-SNAP-20080822/ssl/t1_lib.c
+Index: openssl-SNAP-20080928/ssl/t1_lib.c
 ===================================================================
---- openssl-SNAP-20080822.orig/ssl/t1_lib.c
-+++ openssl-SNAP-20080822/ssl/t1_lib.c
+--- openssl-SNAP-20080928.orig/ssl/t1_lib.c
++++ openssl-SNAP-20080928/ssl/t1_lib.c
 @@ -154,6 +154,12 @@ int tls1_new(SSL *s)
  
  void tls1_free(SSL *s)
@@ -310,7 +308,7 @@ Index: openssl-SNAP-20080822/ssl/t1_lib.c
  
  #ifdef TLSEXT_TYPE_opaque_prf_input
        if (s->s3->client_opaque_prf_input != NULL)
-@@ -1428,6 +1451,15 @@ int tls1_process_ticket(SSL *s, unsigned
+@@ -1435,6 +1458,15 @@ int tls1_process_ticket(SSL *s, unsigned
                                s->tlsext_ticket_expected = 1;
                                return 0;       /* Cache miss */
                                }
@@ -326,10 +324,10 @@ Index: openssl-SNAP-20080822/ssl/t1_lib.c
                        return tls_decrypt_ticket(s, p, size, session_id, len,
                                                                        ret);
                        }
-Index: openssl-SNAP-20080822/ssl/tls1.h
+Index: openssl-SNAP-20080928/ssl/tls1.h
 ===================================================================
---- openssl-SNAP-20080822.orig/ssl/tls1.h
-+++ openssl-SNAP-20080822/ssl/tls1.h
+--- openssl-SNAP-20080928.orig/ssl/tls1.h
++++ openssl-SNAP-20080928/ssl/tls1.h
 @@ -512,6 +512,14 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_T
  #define TLS_MD_MASTER_SECRET_CONST    "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"  /*master secret*/
  #endif
@@ -345,10 +343,10 @@ Index: openssl-SNAP-20080822/ssl/tls1.h
  #ifdef  __cplusplus
  }
  #endif
-Index: openssl-SNAP-20080822/util/ssleay.num
+Index: openssl-SNAP-20080928/util/ssleay.num
 ===================================================================
---- openssl-SNAP-20080822.orig/util/ssleay.num
-+++ openssl-SNAP-20080822/util/ssleay.num
+--- openssl-SNAP-20080928.orig/util/ssleay.num
++++ openssl-SNAP-20080928/util/ssleay.num
 @@ -254,3 +254,5 @@ PEM_read_bio_SSL_SESSION                
  SSL_CTX_set_psk_server_callback         303   EXIST::FUNCTION:PSK
  SSL_get_psk_identity                    304   EXIST::FUNCTION:PSK