mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Tune dependencies
Don't depend on srv.c in config.h, but add explicit checks. This is more in line with other options that only make sense server-side, and also it allows to test full config minus srv.c more easily.
This commit is contained in:
		
							parent
							
								
									2ed05a049a
								
							
						
					
					
						commit
						ddfe5d20d1
					
				@ -422,7 +422,7 @@
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && \
 | 
					#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && \
 | 
				
			||||||
    ( !defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) || !defined(MBEDTLS_SSL_SRV_C) )
 | 
					    !defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY)
 | 
				
			||||||
#error "MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE  defined, but not all prerequisites"
 | 
					#error "MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE  defined, but not all prerequisites"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1145,7 +1145,6 @@
 | 
				
			|||||||
 * flag enables that support.
 | 
					 * flag enables that support.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
 | 
					 * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
 | 
				
			||||||
 *           MBEDTLS_SSL_SRV_C
 | 
					 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Comment this to disable support for clients reusing the source port.
 | 
					 * Comment this to disable support for clients reusing the source port.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
				
			|||||||
@ -3250,7 +3250,7 @@ void mbedtls_ssl_dtls_replay_update( mbedtls_ssl_context *ssl )
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
#endif /* MBEDTLS_SSL_DTLS_ANTI_REPLAY */
 | 
					#endif /* MBEDTLS_SSL_DTLS_ANTI_REPLAY */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE)
 | 
					#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && defined(MBEDTLS_SSL_SRV_C)
 | 
				
			||||||
/* Forward declaration */
 | 
					/* Forward declaration */
 | 
				
			||||||
static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial );
 | 
					static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -3437,7 +3437,7 @@ static int ssl_handle_possible_reconnect( mbedtls_ssl_context *ssl )
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return( ret );
 | 
					    return( ret );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE */
 | 
					#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE && MBEDTLS_SSL_SRV_C */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * ContentType type;
 | 
					 * ContentType type;
 | 
				
			||||||
@ -3533,7 +3533,7 @@ static int ssl_parse_record_header( mbedtls_ssl_context *ssl )
 | 
				
			|||||||
                                        "expected %d, received %d",
 | 
					                                        "expected %d, received %d",
 | 
				
			||||||
                                        ssl->in_epoch, rec_epoch ) );
 | 
					                                        ssl->in_epoch, rec_epoch ) );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE)
 | 
					#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) && defined(MBEDTLS_SSL_SRV_C)
 | 
				
			||||||
            /*
 | 
					            /*
 | 
				
			||||||
             * Check for an epoch 0 ClientHello. We can't use in_msg here to
 | 
					             * Check for an epoch 0 ClientHello. We can't use in_msg here to
 | 
				
			||||||
             * access the first byte of record content (handshake type), as we
 | 
					             * access the first byte of record content (handshake type), as we
 | 
				
			||||||
@ -3551,7 +3551,7 @@ static int ssl_parse_record_header( mbedtls_ssl_context *ssl )
 | 
				
			|||||||
                return( ssl_handle_possible_reconnect( ssl ) );
 | 
					                return( ssl_handle_possible_reconnect( ssl ) );
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE */
 | 
					#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE && MBEDTLS_SSL_SRV_C */
 | 
				
			||||||
                return( MBEDTLS_ERR_SSL_INVALID_RECORD );
 | 
					                return( MBEDTLS_ERR_SSL_INVALID_RECORD );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user