mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Do not zeroize the ssl context if a key exporting function is set
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
		
							parent
							
								
									324f72ec9c
								
							
						
					
					
						commit
						a72fe641cc
					
				@ -695,8 +695,11 @@ static int ssl_tls12_populate_transform( mbedtls_ssl_transform *transform,
 | 
			
		||||
 | 
			
		||||
#if !defined(MBEDTLS_DEBUG_C) && \
 | 
			
		||||
    !defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
 | 
			
		||||
    if( ssl->f_export_keys == NULL )
 | 
			
		||||
    {
 | 
			
		||||
        ssl = NULL; /* make sure we don't use it except for these cases */
 | 
			
		||||
        (void) ssl;
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
@ -959,7 +962,7 @@ static int ssl_tls12_populate_transform( mbedtls_ssl_transform *transform,
 | 
			
		||||
    ((void) mac_dec);
 | 
			
		||||
    ((void) mac_enc);
 | 
			
		||||
 | 
			
		||||
    if( ssl->f_export_keys != NULL )
 | 
			
		||||
    if( ssl != NULL && ssl->f_export_keys != NULL )
 | 
			
		||||
    {
 | 
			
		||||
        ssl->f_export_keys( ssl->p_export_keys,
 | 
			
		||||
                            MBEDTLS_SSL_KEY_EXPORT_TLS12_MASTER_SECRET,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user