mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-25 01:37:22 +00:00
mbedtls: MBEDTLS_PRIVATE
& MBEDTLS_ALLOW_PRIVATE_ACCESS
-related cleanup
This commit is contained in:
@@ -18,8 +18,8 @@ static const char *TAG = "SSL Server";
|
||||
*/
|
||||
static bool ssl_ciphersuite_uses_rsa_key_ex(mbedtls_ssl_context *ssl)
|
||||
{
|
||||
const mbedtls_ssl_ciphersuite_t *ciphersuite_info =
|
||||
ssl->MBEDTLS_PRIVATE(handshake)->ciphersuite_info;
|
||||
int suite_id = mbedtls_ssl_get_ciphersuite_id_from_ssl(ssl);
|
||||
const mbedtls_ssl_ciphersuite_t *ciphersuite_info = mbedtls_ssl_ciphersuite_from_id(suite_id);
|
||||
|
||||
if (ciphersuite_info->MBEDTLS_PRIVATE(key_exchange) == MBEDTLS_KEY_EXCHANGE_RSA ||
|
||||
ciphersuite_info->MBEDTLS_PRIVATE(key_exchange) == MBEDTLS_KEY_EXCHANGE_RSA_PSK) {
|
||||
@@ -34,7 +34,7 @@ static int manage_resource(mbedtls_ssl_context *ssl, bool add)
|
||||
{
|
||||
int state = add ? ssl->MBEDTLS_PRIVATE(state) : ssl->MBEDTLS_PRIVATE(state) - 1;
|
||||
|
||||
if (ssl->MBEDTLS_PRIVATE(state) == MBEDTLS_SSL_HANDSHAKE_OVER || ssl->MBEDTLS_PRIVATE(handshake) == NULL) {
|
||||
if (mbedtls_ssl_is_handshake_over(ssl) || ssl->MBEDTLS_PRIVATE(handshake) == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,9 @@ static int manage_resource(mbedtls_ssl_context *ssl, bool add)
|
||||
case MBEDTLS_SSL_SERVER_CERTIFICATE:
|
||||
if (add) {
|
||||
size_t buffer_len = 3;
|
||||
mbedtls_ssl_key_cert *key_cert = ssl->MBEDTLS_PRIVATE(conf)->MBEDTLS_PRIVATE(key_cert);
|
||||
|
||||
const mbedtls_ssl_config *conf = mbedtls_ssl_context_get_config(ssl);
|
||||
mbedtls_ssl_key_cert *key_cert = conf->MBEDTLS_PRIVATE(key_cert);
|
||||
|
||||
while (key_cert && key_cert->cert) {
|
||||
size_t num;
|
||||
|
Reference in New Issue
Block a user