mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 19:20:40 -04:00 
			
		
		
		
	Rm unneeded counter increment with DTLS
This commit is contained in:
		
							parent
							
								
									6312e0f4e6
								
							
						
					
					
						commit
						ea22ce577e
					
				| @ -1705,8 +1705,14 @@ static int ssl_decrypt_buf( ssl_context *ssl ) | |||||||
|     else |     else | ||||||
|         ssl->nb_zero = 0; |         ssl->nb_zero = 0; | ||||||
| 
 | 
 | ||||||
|     /* Input counter not used with DTLS right now,
 | #if defined(POLARSSL_SSL_PROTO_DTLS) | ||||||
|      * but it doesn't hurt to have this part ready */ |     if( ssl->transport == SSL_TRANSPORT_DATAGRAM ) | ||||||
|  |     { | ||||||
|  |         ; /* in_ctr handled differently in DTLS */ | ||||||
|  |     } | ||||||
|  |     else | ||||||
|  | #endif | ||||||
|  |     { | ||||||
|         for( i = 8; i > ssl_ep_len( ssl ); i-- ) |         for( i = 8; i > ssl_ep_len( ssl ); i-- ) | ||||||
|             if( ++ssl->in_ctr[i - 1] != 0 ) |             if( ++ssl->in_ctr[i - 1] != 0 ) | ||||||
|                 break; |                 break; | ||||||
| @ -1717,6 +1723,7 @@ static int ssl_decrypt_buf( ssl_context *ssl ) | |||||||
|             SSL_DEBUG_MSG( 1, ( "incoming message counter would wrap" ) ); |             SSL_DEBUG_MSG( 1, ( "incoming message counter would wrap" ) ); | ||||||
|             return( POLARSSL_ERR_SSL_COUNTER_WRAPPING ); |             return( POLARSSL_ERR_SSL_COUNTER_WRAPPING ); | ||||||
|         } |         } | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     SSL_DEBUG_MSG( 2, ( "<= decrypt buf" ) ); |     SSL_DEBUG_MSG( 2, ( "<= decrypt buf" ) ); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Manuel Pégourié-Gonnard
						Manuel Pégourié-Gonnard