mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Updated the EAP-FAST patch for the latest OpenSSL 0.9.9 snapshot
This commit is contained in:
parent
2298ca6410
commit
8816045743
@ -6,9 +6,9 @@ This is based on the patch from Alexey Kobozev <akobozev@cisco.com>
|
||||
|
||||
|
||||
|
||||
diff -upr openssl-SNAP-20080415.orig/ssl/s3_clnt.c openssl-SNAP-20080415/ssl/s3_clnt.c
|
||||
--- openssl-SNAP-20080415.orig/ssl/s3_clnt.c 2008-01-06 00:00:33.000000000 +0200
|
||||
+++ openssl-SNAP-20080415/ssl/s3_clnt.c 2008-04-15 16:58:39.000000000 +0300
|
||||
diff -upr openssl-SNAP-20080528.orig/ssl/s3_clnt.c openssl-SNAP-20080528/ssl/s3_clnt.c
|
||||
--- openssl-SNAP-20080528.orig/ssl/s3_clnt.c 2008-04-29 21:00:17.000000000 +0300
|
||||
+++ openssl-SNAP-20080528/ssl/s3_clnt.c 2008-05-29 10:55:43.000000000 +0300
|
||||
@@ -785,6 +785,20 @@ int ssl3_get_server_hello(SSL *s)
|
||||
goto f_err;
|
||||
}
|
||||
@ -30,10 +30,24 @@ diff -upr openssl-SNAP-20080415.orig/ssl/s3_clnt.c openssl-SNAP-20080415/ssl/s3_
|
||||
if (j != 0 && j == s->session->session_id_length
|
||||
&& memcmp(p,s->session->session_id,j) == 0)
|
||||
{
|
||||
diff -upr openssl-SNAP-20080415.orig/ssl/s3_srvr.c openssl-SNAP-20080415/ssl/s3_srvr.c
|
||||
--- openssl-SNAP-20080415.orig/ssl/s3_srvr.c 2007-10-26 16:00:29.000000000 +0300
|
||||
+++ openssl-SNAP-20080415/ssl/s3_srvr.c 2008-04-15 16:32:08.000000000 +0300
|
||||
@@ -992,6 +992,59 @@ int ssl3_get_client_hello(SSL *s)
|
||||
@@ -2918,11 +2932,8 @@ static int ssl3_check_finished(SSL *s)
|
||||
{
|
||||
int ok;
|
||||
long n;
|
||||
- /* If we have no ticket or session ID is non-zero length (a match of
|
||||
- * a non-zero session length would never reach here) it cannot be a
|
||||
- * resumed session.
|
||||
- */
|
||||
- if (!s->session->tlsext_tick || s->session->session_id_length)
|
||||
+ /* If we have no ticket it cannot be a resumed session. */
|
||||
+ if (!s->session->tlsext_tick)
|
||||
return 1;
|
||||
/* this function is called when we really expect a Certificate
|
||||
* message, so permit appropriate message length */
|
||||
diff -upr openssl-SNAP-20080528.orig/ssl/s3_srvr.c openssl-SNAP-20080528/ssl/s3_srvr.c
|
||||
--- openssl-SNAP-20080528.orig/ssl/s3_srvr.c 2008-04-30 20:00:38.000000000 +0300
|
||||
+++ openssl-SNAP-20080528/ssl/s3_srvr.c 2008-05-29 10:49:25.000000000 +0300
|
||||
@@ -1004,6 +1004,59 @@ int ssl3_get_client_hello(SSL *s)
|
||||
SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_CLIENTHELLO_TLSEXT);
|
||||
goto err;
|
||||
}
|
||||
@ -93,7 +107,7 @@ diff -upr openssl-SNAP-20080415.orig/ssl/s3_srvr.c openssl-SNAP-20080415/ssl/s3_
|
||||
#endif
|
||||
|
||||
/* Worst case, we will use the NULL compression, but if we have other
|
||||
@@ -1118,16 +1171,22 @@ int ssl3_send_server_hello(SSL *s)
|
||||
@@ -1130,16 +1183,22 @@ int ssl3_send_server_hello(SSL *s)
|
||||
unsigned char *buf;
|
||||
unsigned char *p,*d;
|
||||
int i,sl;
|
||||
@ -117,10 +131,10 @@ diff -upr openssl-SNAP-20080415.orig/ssl/s3_srvr.c openssl-SNAP-20080415/ssl/s3_
|
||||
/* Do the message type and length last */
|
||||
d=p= &(buf[4]);
|
||||
|
||||
diff -upr openssl-SNAP-20080415.orig/ssl/ssl.h openssl-SNAP-20080415/ssl/ssl.h
|
||||
--- openssl-SNAP-20080415.orig/ssl/ssl.h 2007-10-27 03:01:28.000000000 +0300
|
||||
+++ openssl-SNAP-20080415/ssl/ssl.h 2008-04-15 16:32:08.000000000 +0300
|
||||
@@ -353,6 +353,7 @@ extern "C" {
|
||||
diff -upr openssl-SNAP-20080528.orig/ssl/ssl.h openssl-SNAP-20080528/ssl/ssl.h
|
||||
--- openssl-SNAP-20080528.orig/ssl/ssl.h 2008-05-26 15:00:37.000000000 +0300
|
||||
+++ openssl-SNAP-20080528/ssl/ssl.h 2008-05-29 10:49:25.000000000 +0300
|
||||
@@ -354,6 +354,7 @@ extern "C" {
|
||||
* 'struct ssl_st *' function parameters used to prototype callbacks
|
||||
* in SSL_CTX. */
|
||||
typedef struct ssl_st *ssl_crock_st;
|
||||
@ -128,7 +142,7 @@ diff -upr openssl-SNAP-20080415.orig/ssl/ssl.h openssl-SNAP-20080415/ssl/ssl.h
|
||||
|
||||
/* used to hold info on the particular ciphers used */
|
||||
typedef struct ssl_cipher_st
|
||||
@@ -379,6 +380,8 @@ DECLARE_STACK_OF(SSL_CIPHER)
|
||||
@@ -380,6 +381,8 @@ DECLARE_STACK_OF(SSL_CIPHER)
|
||||
typedef struct ssl_st SSL;
|
||||
typedef struct ssl_ctx_st SSL_CTX;
|
||||
|
||||
@ -137,7 +151,7 @@ diff -upr openssl-SNAP-20080415.orig/ssl/ssl.h openssl-SNAP-20080415/ssl/ssl.h
|
||||
/* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */
|
||||
typedef struct ssl_method_st
|
||||
{
|
||||
@@ -1121,6 +1124,13 @@ struct ssl_st
|
||||
@@ -1128,6 +1131,13 @@ struct ssl_st
|
||||
void *tlsext_opaque_prf_input;
|
||||
size_t tlsext_opaque_prf_input_len;
|
||||
|
||||
@ -151,7 +165,7 @@ diff -upr openssl-SNAP-20080415.orig/ssl/ssl.h openssl-SNAP-20080415/ssl/ssl.h
|
||||
SSL_CTX * initial_ctx; /* initial ctx, used to store sessions */
|
||||
#define session_ctx initial_ctx
|
||||
#else
|
||||
@@ -1721,6 +1731,12 @@ void *SSL_COMP_get_compression_methods(v
|
||||
@@ -1729,6 +1739,12 @@ void *SSL_COMP_get_compression_methods(v
|
||||
int SSL_COMP_add_compression_method(int id,void *cm);
|
||||
#endif
|
||||
|
||||
@ -164,7 +178,7 @@ diff -upr openssl-SNAP-20080415.orig/ssl/ssl.h openssl-SNAP-20080415/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.
|
||||
@@ -1920,6 +1936,7 @@ void ERR_load_SSL_strings(void);
|
||||
@@ -1928,6 +1944,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
|
||||
@ -172,9 +186,9 @@ diff -upr openssl-SNAP-20080415.orig/ssl/ssl.h openssl-SNAP-20080415/ssl/ssl.h
|
||||
|
||||
/* Reason codes. */
|
||||
#define SSL_R_APP_DATA_IN_HANDSHAKE 100
|
||||
diff -upr openssl-SNAP-20080415.orig/ssl/ssl_err.c openssl-SNAP-20080415/ssl/ssl_err.c
|
||||
--- openssl-SNAP-20080415.orig/ssl/ssl_err.c 2007-10-27 03:01:29.000000000 +0300
|
||||
+++ openssl-SNAP-20080415/ssl/ssl_err.c 2008-04-15 16:32:08.000000000 +0300
|
||||
diff -upr openssl-SNAP-20080528.orig/ssl/ssl_err.c openssl-SNAP-20080528/ssl/ssl_err.c
|
||||
--- openssl-SNAP-20080528.orig/ssl/ssl_err.c 2007-10-27 03:01:29.000000000 +0300
|
||||
+++ openssl-SNAP-20080528/ssl/ssl_err.c 2008-05-29 10:49:25.000000000 +0300
|
||||
@@ -260,6 +260,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"},
|
||||
@ -183,9 +197,9 @@ diff -upr openssl-SNAP-20080415.orig/ssl/ssl_err.c openssl-SNAP-20080415/ssl/ssl
|
||||
{0,NULL}
|
||||
};
|
||||
|
||||
diff -upr openssl-SNAP-20080415.orig/ssl/ssl_sess.c openssl-SNAP-20080415/ssl/ssl_sess.c
|
||||
--- openssl-SNAP-20080415.orig/ssl/ssl_sess.c 2007-10-17 21:00:45.000000000 +0300
|
||||
+++ openssl-SNAP-20080415/ssl/ssl_sess.c 2008-04-15 16:32:08.000000000 +0300
|
||||
diff -upr openssl-SNAP-20080528.orig/ssl/ssl_sess.c openssl-SNAP-20080528/ssl/ssl_sess.c
|
||||
--- openssl-SNAP-20080528.orig/ssl/ssl_sess.c 2008-05-26 15:00:37.000000000 +0300
|
||||
+++ openssl-SNAP-20080528/ssl/ssl_sess.c 2008-05-29 10:49:25.000000000 +0300
|
||||
@@ -831,6 +831,52 @@ long SSL_CTX_get_timeout(const SSL_CTX *
|
||||
return(s->session_timeout);
|
||||
}
|
||||
@ -239,9 +253,9 @@ diff -upr openssl-SNAP-20080415.orig/ssl/ssl_sess.c openssl-SNAP-20080415/ssl/ss
|
||||
typedef struct timeout_param_st
|
||||
{
|
||||
SSL_CTX *ctx;
|
||||
diff -upr openssl-SNAP-20080415.orig/ssl/t1_lib.c openssl-SNAP-20080415/ssl/t1_lib.c
|
||||
--- openssl-SNAP-20080415.orig/ssl/t1_lib.c 2008-03-17 00:00:10.000000000 +0200
|
||||
+++ openssl-SNAP-20080415/ssl/t1_lib.c 2008-04-15 16:32:08.000000000 +0300
|
||||
diff -upr openssl-SNAP-20080528.orig/ssl/t1_lib.c openssl-SNAP-20080528/ssl/t1_lib.c
|
||||
--- openssl-SNAP-20080528.orig/ssl/t1_lib.c 2008-04-30 20:00:39.000000000 +0300
|
||||
+++ openssl-SNAP-20080528/ssl/t1_lib.c 2008-05-29 10:49:25.000000000 +0300
|
||||
@@ -154,6 +154,12 @@ int tls1_new(SSL *s)
|
||||
|
||||
void tls1_free(SSL *s)
|
||||
@ -288,7 +302,7 @@ diff -upr openssl-SNAP-20080415.orig/ssl/t1_lib.c openssl-SNAP-20080415/ssl/t1_l
|
||||
|
||||
#ifdef TLSEXT_TYPE_opaque_prf_input
|
||||
if (s->s3->client_opaque_prf_input != NULL)
|
||||
@@ -1425,6 +1448,8 @@ int tls1_process_ticket(SSL *s, unsigned
|
||||
@@ -1427,6 +1450,8 @@ int tls1_process_ticket(SSL *s, unsigned
|
||||
s->tlsext_ticket_expected = 1;
|
||||
return 0; /* Cache miss */
|
||||
}
|
||||
@ -297,10 +311,10 @@ diff -upr openssl-SNAP-20080415.orig/ssl/t1_lib.c openssl-SNAP-20080415/ssl/t1_l
|
||||
return tls_decrypt_ticket(s, p, size, session_id, len,
|
||||
ret);
|
||||
}
|
||||
diff -upr openssl-SNAP-20080415.orig/ssl/tls1.h openssl-SNAP-20080415/ssl/tls1.h
|
||||
--- openssl-SNAP-20080415.orig/ssl/tls1.h 2007-09-27 01:01:39.000000000 +0300
|
||||
+++ openssl-SNAP-20080415/ssl/tls1.h 2008-04-15 16:32:08.000000000 +0300
|
||||
@@ -509,6 +509,14 @@ SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_OPA
|
||||
diff -upr openssl-SNAP-20080528.orig/ssl/tls1.h openssl-SNAP-20080528/ssl/tls1.h
|
||||
--- openssl-SNAP-20080528.orig/ssl/tls1.h 2008-04-30 20:00:39.000000000 +0300
|
||||
+++ openssl-SNAP-20080528/ssl/tls1.h 2008-05-29 10:49:25.000000000 +0300
|
||||
@@ -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
|
||||
|
||||
@ -315,9 +329,9 @@ diff -upr openssl-SNAP-20080415.orig/ssl/tls1.h openssl-SNAP-20080415/ssl/tls1.h
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
diff -upr openssl-SNAP-20080415.orig/util/ssleay.num openssl-SNAP-20080415/util/ssleay.num
|
||||
--- openssl-SNAP-20080415.orig/util/ssleay.num 2007-08-31 16:03:14.000000000 +0300
|
||||
+++ openssl-SNAP-20080415/util/ssleay.num 2008-04-15 16:32:08.000000000 +0300
|
||||
diff -upr openssl-SNAP-20080528.orig/util/ssleay.num openssl-SNAP-20080528/util/ssleay.num
|
||||
--- openssl-SNAP-20080528.orig/util/ssleay.num 2007-08-31 16:03:14.000000000 +0300
|
||||
+++ openssl-SNAP-20080528/util/ssleay.num 2008-05-29 10:49:25.000000000 +0300
|
||||
@@ -253,3 +253,5 @@ PEM_write_bio_SSL_SESSION
|
||||
PEM_read_SSL_SESSION 302 EXIST:!WIN16:FUNCTION:
|
||||
PEM_read_bio_SSL_SESSION 303 EXIST::FUNCTION:
|
||||
|
Loading…
Reference in New Issue
Block a user