List Info

Thread: OpenSSL: openssl/ssl/ ssl_asn1.c




OpenSSL: openssl/ssl/ ssl_asn1.c
user name
2006-03-26 10:53:52
  OpenSSL CVS Repository
  http://cvs.openssl.org/
 
____________________________________________________________
________________

  Server: cvs.openssl.org                  Name:   Bodo
Moeller
  Root:   /v/openssl/cvs                   Email:  bodoopenssl.org
  Module: openssl                          Date:  
26-Mar-2006 12:53:52
  Branch: HEAD                             Handle:
2006032611535200

  Modified files:
    openssl/ssl             ssl_asn1.c

  Log:
    Simplify ASN.1 for point format list
    
    Submitted by: Douglas Stebila

  Summary:
    Revision    Changes     Path
    1.27        +5  -27     openssl/ssl/ssl_asn1.c
 
____________________________________________________________
________________

  patch -p0 <<' .'
  Index: openssl/ssl/ssl_asn1.c
 
============================================================
================
  $ cvs diff -u -r1.26 -r1.27 ssl_asn1.c
  --- openssl/ssl/ssl_asn1.c	13 Mar 2006 12:32:50 -0000	1.26
  +++ openssl/ssl/ssl_asn1.c	26 Mar 2006 10:53:52 -0000	1.27
   -224,15 +224,9 
   #ifndef OPENSSL_NO_EC
   	if (in->tlsext_ecpointformatlist)
   		{
 
-		a.tlsext_ecpointformatlist.length=1+in->tlsext_ecpoint
formatlist_length;
 
+		a.tlsext_ecpointformatlist.length=in->tlsext_ecpointfo
rmatlist_length;
   		a.tlsext_ecpointformatlist.type=V_ASN1_OCTET_STRING;
  -		if ((a.tlsext_ecpointformatlist.data =
OPENSSL_malloc(1+in->tlsext_ecpointformatlist_length)) ==
NULL)
  -			{
  -			SSLerr(SSL_F_I2D_SSL_SESSION,ERR_R_MALLOC_FAILURE);
  -			return(0);
  -			}
  -		*a.tlsext_ecpointformatlist.data = (unsigned char)
in->tlsext_ecpointformatlist_length;
  -		memcpy(a.tlsext_ecpointformatlist.data+1,
in->tlsext_ecpointformatlist,
in->tlsext_ecpointformatlist_length);
  +		a.tlsext_ecpointformatlist.data=(unsigned char
*)in->tlsext_ecpointformatlist;
   		}
   #endif /* OPENSSL_NO_EC */
   #endif /* OPENSSL_NO_TLSEXT */
   -325,11 +319,6 
   		M_ASN1_I2D_put_EXP_opt(&(a.psk_identity),
i2d_ASN1_OCTET_STRING,9,v9);
   #endif /* OPENSSL_NO_PSK */
   	M_ASN1_I2D_finish();
  -#ifndef OPENSSL_NO_TLSEXT
  -#ifndef OPENSSL_NO_EC
  -	OPENSSL_free(a.tlsext_ecpointformatlist.data);
  -#endif /* OPENSSL_NO_EC */
  -#endif /* OPENSSL_NO_TLSEXT */
   	}
   
   SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const
unsigned char **pp,
   -516,29 +505,18 
   
   #ifndef OPENSSL_NO_EC
   	os.length=0;
  -	os.data=NULL;
   	M_ASN1_D2I_get_EXP_opt(osp,d2i_ASN1_OCTET_STRING,7);
   	if (os.data)
   		{
  -		if ((ret->tlsext_ecpointformatlist =
OPENSSL_malloc(os.length - 1)) == NULL)
  -			{
  -			SSLerr(SSL_F_D2I_SSL_SESSION,ERR_R_MALLOC_FAILURE);
  -			}
  -		else
  -			{
  -			ret->tlsext_ecpointformatlist_length = os.length -
1;
  -			memcpy(ret->tlsext_ecpointformatlist, (unsigned
char *) os.data + 1, os.length - 1);
  -			}
  +		ret->tlsext_ecpointformatlist_length=os.length;
 
+		memcpy(ret->tlsext_ecpointformatlist,os.data,ret->t
lsext_ecpointformatlist_length);
   		OPENSSL_free(os.data);
   		os.data = NULL;
   		os.length = 0;
   		}
   	else
  -		{
  -		ret->tlsext_ecpointformatlist=NULL;
   		ret->tlsext_ecpointformatlist_length=0;
  -		}
  -
  +		ret->tlsext_ecpointformatlist=NULL;
   #endif /* OPENSSL_NO_EC */
   #endif /* OPENSSL_NO_TLSEXT */
   
   .
____________________________________________________________
__________
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 )