List Info

Thread: OpenSSL: openssl/ssl/ d1_pkt.c d1_srvr.c dtls1.h s3_srvr.c




OpenSSL: openssl/ssl/ d1_pkt.c d1_srvr.c dtls1.h s3_srvr.c
country flaguser name
Germany
2007-09-30 13:53:55
  OpenSSL CVS Repository
  http://cvs.openssl.org/
 
____________________________________________________________
________________

  Server: cvs.openssl.org                  Name:   Andy
Polyakov
  Root:   /v/openssl/cvs                   Email:  approopenssl.org
  Module: openssl                          Date:  
30-Sep-2007 20:53:55
  Branch: HEAD                             Handle:
2007093019535400

  Modified files:
    openssl/ssl             d1_pkt.c d1_srvr.c dtls1.h
s3_srvr.c

  Log:
    Switch to RFC-compliant version encoding in DTLS.

  Summary:
    Revision    Changes     Path
    1.18        +1  -1      openssl/ssl/d1_pkt.c
    1.16        +10 -10     openssl/ssl/d1_srvr.c
    1.8         +1  -3      openssl/ssl/dtls1.h
    1.157       +4  -3      openssl/ssl/s3_srvr.c
 
____________________________________________________________
________________

  patch -p0 <<' .'
  Index: openssl/ssl/d1_pkt.c
 
============================================================
================
  $ cvs diff -u -r1.17 -r1.18 d1_pkt.c
  --- openssl/ssl/d1_pkt.c	4 Jun 2007 17:04:33 -0000	1.17
  +++ openssl/ssl/d1_pkt.c	30 Sep 2007 18:53:54 -0000	1.18
   -526,7 +526,7 
   	SSL3_RECORD *rr;
   	SSL_SESSION *sess;
   	unsigned char *p;
  -	short version;
  +	unsigned short version;
   	DTLS1_BITMAP *bitmap;
   	unsigned int is_next_epoch;
   
   .
  patch -p0 <<' .'
  Index: openssl/ssl/d1_srvr.c
 
============================================================
================
  $ cvs diff -u -r1.15 -r1.16 d1_srvr.c
  --- openssl/ssl/d1_srvr.c	19 Sep 2007 01:43:59 -0000	1.15
  +++ openssl/ssl/d1_srvr.c	30 Sep 2007 18:53:54 -0000	1.16
   -121,7 +121,6 
   #include <openssl/evp.h>
   #include <openssl/x509.h>
   #include <openssl/md5.h>
  -#include <openssl/bn.h>
   #ifndef OPENSSL_NO_DH
   #include <openssl/dh.h>
   #endif
   -626,15 +625,16 
   		*(p++) = s->version & 0xFF;
   
   		*(p++) = (unsigned char) s->d1->cookie_len;
  -	if (s->ctx->app_gen_cookie_cb != NULL &&
  -	    s->ctx->app_gen_cookie_cb(s,
s->d1->cookie, 
  -		&(s->d1->cookie_len)) == 0)
  -		{
 
-		SSLerr(SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST,ERR_R_INTERN
AL_ERROR);
  -		return 0;
  -		}
  -	/* else the cookie is assumed to have 
  -	 * been initialized by the application */
  +
  +		if (s->ctx->app_gen_cookie_cb != NULL &&
  +		    s->ctx->app_gen_cookie_cb(s,
s->d1->cookie, 
  +			&(s->d1->cookie_len)) == 0)
  +			{
 
+			SSLerr(SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST,ERR_R_INTER
NAL_ERROR);
  +			return 0;
  +			}
  +		/* else the cookie is assumed to have 
  +		 * been initialized by the application */
   
   		memcpy(p, s->d1->cookie,
s->d1->cookie_len);
   		p += s->d1->cookie_len;
   .
  patch -p0 <<' .'
  Index: openssl/ssl/dtls1.h
 
============================================================
================
  $ cvs diff -u -r1.7 -r1.8 dtls1.h
  --- openssl/ssl/dtls1.h	7 Jan 2006 20:44:29 -0000	1.7
  +++ openssl/ssl/dtls1.h	30 Sep 2007 18:53:54 -0000	1.8
   -67,9 +67,7 
   extern "C" {
   #endif
   
  -#define DTLS1_VERSION			0x0100
  -#define DTLS1_VERSION_MAJOR		0x01
  -#define DTLS1_VERSION_MINOR		0x00
  +#define DTLS1_VERSION			0xFEFF
   
   #if 0
   #define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE    110
   .
  patch -p0 <<' .'
  Index: openssl/ssl/s3_srvr.c
 
============================================================
================
  $ cvs diff -u -r1.156 -r1.157 s3_srvr.c
  --- openssl/ssl/s3_srvr.c	26 Sep 2007 21:56:58
-0000	1.156
  +++ openssl/ssl/s3_srvr.c	30 Sep 2007 18:53:54
-0000	1.157
   -774,7 +774,8 
   	s->client_version=(((int)p[0])<<8)|(int)p[1];
   	p+=2;
   
  -	if (s->client_version < s->version)
  +	if ((s->version == DTLS1_VERSION &&
s->client_version > s->version) ||
  +	    (s->version != DTLS1_VERSION &&
s->client_version < s->version))
   		{
   		SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,
SSL_R_WRONG_VERSION_NUMBER);
   		if ((s->client_version>>8) ==
SSL3_VERSION_MAJOR)
   -825,7 +826,7 
   
   	p+=j;
   
  -	if (SSL_version(s) == DTLS1_VERSION)
  +	if (s->version == DTLS1_VERSION)
   		{
   		/* cookie stuff */
   		cookie_len = *(p++);
   -1821,7 +1822,7 
   			rsa=pkey->pkey.rsa;
   			}
   
  -		/* TLS */
  +		/* TLS and [incidentally] DTLS */
   		if (s->version > SSL3_VERSION)
   			{
   			n2s(p,i);
   .
____________________________________________________________
__________
OpenSSL Project                                 http://www.openssl.org
CVS Repository Commit List                    
openssl-cvsopenssl.org
Automated List Manager                          
majordomoopenssl.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )