-
Couldn't load subscription status.
- Fork 2.8k
Description
Remove all uses of mbedtls_pk_debug() in ssl_debug.c and simplify the way public keys are printed in debug logs.
Currently after calling pk_debug() we do some parsing of the output in order to print out separately N and E for RSA keys, and X and Y for ECC keys. That's overkill. This was to ensure compatibility with the old output format, whose original implementation relied heavily on the ability to break abstraction barriers and access internals of rsa.h and ecp.h. We no longer live in that world, an I don't think we need to go to such lengths to preserve the old output format of the debug log.
Instead, let's just print out the public key in the PSA format (which is pretty compact), using mbedtls_pk_write_pubkey_psa() introduced by Mbed-TLS/TF-PSA-Crypto#529
If we have to change some test data due to the change of format, I think that's OK: debug output is not guaranteed to remain stable.
Depends on: Mbed-TLS/TF-PSA-Crypto#529
Metadata
Metadata
Assignees
Labels
Type
Projects
Status