ssl_context_info: explicitly note accesses to private fields
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
72da8b3521
commit
74589ba31c
1 changed files with 7 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
|||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
|
||||
//#define MBEDTLS_ALLOW_PRIVATE_ACCESS
|
||||
|
||||
#include "mbedtls/build_info.h"
|
||||
#include "mbedtls/debug.h"
|
||||
|
@ -551,23 +551,23 @@ void print_deserialized_ssl_session(const uint8_t *ssl, uint32_t len,
|
|||
const mbedtls_md_info_t *md_info;
|
||||
#endif
|
||||
|
||||
printf("\tciphersuite : %s\n", ciphersuite_info->name);
|
||||
printf("\tcipher flags : 0x%02X\n", ciphersuite_info->flags);
|
||||
printf("\tciphersuite : %s\n", mbedtls_ssl_ciphersuite_get_name(ciphersuite_info));
|
||||
printf("\tcipher flags : 0x%02X\n", ciphersuite_info->MBEDTLS_PRIVATE(flags));
|
||||
|
||||
#if defined(MBEDTLS_CIPHER_C)
|
||||
const mbedtls_cipher_info_t *cipher_info;
|
||||
cipher_info = mbedtls_cipher_info_from_type(ciphersuite_info->cipher);
|
||||
cipher_info = mbedtls_cipher_info_from_type(ciphersuite_info->MBEDTLS_PRIVATE(cipher));
|
||||
if (cipher_info == NULL) {
|
||||
printf_err("Cannot find cipher info\n");
|
||||
} else {
|
||||
printf("\tcipher : %s\n", cipher_info->name);
|
||||
printf("\tcipher : %s\n", mbedtls_cipher_info_get_name(cipher_info));
|
||||
}
|
||||
#else /* MBEDTLS_CIPHER_C */
|
||||
printf("\tcipher type : %d\n", ciphersuite_info->cipher);
|
||||
printf("\tcipher type : %d\n", ciphersuite_info->MBEDTLS_PRIVATE(cipher));
|
||||
#endif /* MBEDTLS_CIPHER_C */
|
||||
|
||||
#if defined(MBEDTLS_MD_C)
|
||||
md_info = mbedtls_md_info_from_type(ciphersuite_info->mac);
|
||||
md_info = mbedtls_md_info_from_type(ciphersuite_info->MBEDTLS_PRIVATE(mac));
|
||||
if (md_info == NULL) {
|
||||
printf_err("Cannot find Message-Digest info\n");
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue