components/openssl: add SSL any version function setting
This commit is contained in:
parent
2033068a72
commit
47e83ee65e
1 changed files with 12 additions and 9 deletions
|
@ -111,6 +111,7 @@ int ssl_pm_new(SSL *ssl)
|
||||||
if (ret)
|
if (ret)
|
||||||
SSL_ERR(ret, failed2, "mbedtls_ssl_config_defaults:[-0x%x]\n", -ret);
|
SSL_ERR(ret, failed2, "mbedtls_ssl_config_defaults:[-0x%x]\n", -ret);
|
||||||
|
|
||||||
|
if (TLS_ANY_VERSION != ssl->version) {
|
||||||
if (TLS1_2_VERSION == ssl->version)
|
if (TLS1_2_VERSION == ssl->version)
|
||||||
version = MBEDTLS_SSL_MINOR_VERSION_3;
|
version = MBEDTLS_SSL_MINOR_VERSION_3;
|
||||||
else if (TLS1_1_VERSION == ssl->version)
|
else if (TLS1_1_VERSION == ssl->version)
|
||||||
|
@ -120,7 +121,9 @@ int ssl_pm_new(SSL *ssl)
|
||||||
else
|
else
|
||||||
version = MBEDTLS_SSL_MINOR_VERSION_0;
|
version = MBEDTLS_SSL_MINOR_VERSION_0;
|
||||||
|
|
||||||
//mbedtls_ssl_conf_max_version(&ssl_pm->conf, MBEDTLS_SSL_MAJOR_VERSION_3, version);
|
mbedtls_ssl_conf_max_version(&ssl_pm->conf, MBEDTLS_SSL_MAJOR_VERSION_3, version);
|
||||||
|
mbedtls_ssl_conf_min_version(&ssl_pm->conf, MBEDTLS_SSL_MAJOR_VERSION_3, version);
|
||||||
|
}
|
||||||
|
|
||||||
mbedtls_ssl_conf_rng(&ssl_pm->conf, mbedtls_ctr_drbg_random, &ssl_pm->ctr_drbg);
|
mbedtls_ssl_conf_rng(&ssl_pm->conf, mbedtls_ctr_drbg_random, &ssl_pm->ctr_drbg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue