mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	Don't allocate space for DTLS header if DTLS is disabled
This commit is contained in:
		
							parent
							
								
									184f675256
								
							
						
					
					
						commit
						d25d444134
					
				@ -158,11 +158,17 @@
 | 
				
			|||||||
#error Bad configuration - protected record payload too large.
 | 
					#error Bad configuration - protected record payload too large.
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define MBEDTLS_SSL_BUFFER_LEN  ( MBEDTLS_SSL_PAYLOAD_LEN        \
 | 
					#if !defined(MBEDTLS_SSL_PROTO_DTLS)
 | 
				
			||||||
                        + 5 /* TLS record header      */         \
 | 
					/* https://tools.ietf.org/html/rfc5246#section-6.2 */
 | 
				
			||||||
                        + 8 /* Additional DTLS fields */         \
 | 
					#define MBEDTLS_SSL_HEADER_LEN 5
 | 
				
			||||||
                        )
 | 
					#else
 | 
				
			||||||
 | 
					/* https://tools.ietf.org/html/rfc6347#section-4.1  */
 | 
				
			||||||
 | 
					/* 8 additional bytes for epoch and sequence number */
 | 
				
			||||||
 | 
					#define MBEDTLS_SSL_HEADER_LEN 13
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define MBEDTLS_SSL_BUFFER_LEN  \
 | 
				
			||||||
 | 
					    ( ( MBEDTLS_SSL_HEADER_LEN ) + ( MBEDTLS_SSL_PAYLOAD_LEN ) )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * TLS extension flags (for extensions with outgoing ServerHello content
 | 
					 * TLS extension flags (for extensions with outgoing ServerHello content
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user