mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Add EC J-PAKE context in handshake structure
This commit is contained in:
		
							parent
							
								
									f472179d44
								
							
						
					
					
						commit
						76cfd3f97f
					
				@ -41,6 +41,10 @@
 | 
			
		||||
#include "sha512.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_ECJPAKE_C)
 | 
			
		||||
#include "ecjpake.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && !defined(inline)
 | 
			
		||||
#define inline __inline
 | 
			
		||||
#endif
 | 
			
		||||
@ -168,6 +172,9 @@ struct mbedtls_ssl_handshake_params
 | 
			
		||||
#if defined(MBEDTLS_ECDH_C)
 | 
			
		||||
    mbedtls_ecdh_context ecdh_ctx;              /*!<  ECDH key exchange       */
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(MBEDTLS_ECJPAKE_C)
 | 
			
		||||
    mbedtls_ecjpake_context ecjpake_ctx;        /*!< EC J-PAKE key exchange */
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
 | 
			
		||||
    defined(MBEDTLS_ECJPAKE_C)
 | 
			
		||||
    const mbedtls_ecp_curve_info **curves;      /*!<  Supported elliptic curves */
 | 
			
		||||
 | 
			
		||||
@ -4932,6 +4932,9 @@ static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake )
 | 
			
		||||
#if defined(MBEDTLS_ECDH_C)
 | 
			
		||||
    mbedtls_ecdh_init( &handshake->ecdh_ctx );
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(MBEDTLS_ECJPAKE_C)
 | 
			
		||||
    mbedtls_ecjpake_init( &handshake->ecjpake_ctx );
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
 | 
			
		||||
    handshake->sni_authmode = MBEDTLS_SSL_VERIFY_UNSET;
 | 
			
		||||
@ -6590,6 +6593,9 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_handshake_params *handshake )
 | 
			
		||||
#if defined(MBEDTLS_ECDH_C)
 | 
			
		||||
    mbedtls_ecdh_free( &handshake->ecdh_ctx );
 | 
			
		||||
#endif
 | 
			
		||||
#if defined(MBEDTLS_ECJPAKE_C)
 | 
			
		||||
    mbedtls_ecjpake_free( &handshake->ecjpake_ctx );
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)
 | 
			
		||||
    /* explicit void pointer cast for buggy MS compiler */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user