mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 23:35:43 +01:00
Fix mbedtls_ssl_conf_cid() to not depend on macro constant values
The previous implementation of mbedtls_ssl_conf_cid() relied on MBEDTLS_SSL_UNEXPECTED_CID_IGNORE being defined as 1.
This commit is contained in:
parent
a69b4315eb
commit
791ec6bff2
@ -118,8 +118,13 @@ int mbedtls_ssl_conf_cid( mbedtls_ssl_config *conf,
|
||||
if( len > MBEDTLS_SSL_CID_IN_LEN_MAX )
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
|
||||
conf->ignore_unexpected_cid =
|
||||
( ignore_other_cid == MBEDTLS_SSL_UNEXPECTED_CID_IGNORE );
|
||||
if( ignore_other_cid != MBEDTLS_SSL_UNEXPECTED_CID_FAIL &&
|
||||
ignore_other_cid != MBEDTLS_SSL_UNEXPECTED_CID_IGNORE )
|
||||
{
|
||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
conf->ignore_unexpected_cid = ignore_other_cid;
|
||||
conf->cid_len = len;
|
||||
return( 0 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user