mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Rm (use of) `pk_get_name()`

Open mpg opened this issue 2 months ago • 0 comments

The function mbedtls_pk_get_name() is not public so we should stop using it in Mbed TLS. We also want to remove it from TF-PSA-Crypto.

Step 1: stop using in mbedtls. Mostly we want to create an equivalent in X.509, implemented on top of the newly introduced mbedtls_pk_get_key_type() (see https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/509) plus PSA_KEY_TYPE_IS_RSA() and PSA_KEY_TYPE_IS_ECC() plus our own strings. I don't think the exact strings are part of the documented interface so it's probably OK if these need to change a bit.

Step 2: remove from crypto. We want to remove the private function and associated test, but also the name field in pk_info which was only used for this.

Depends on: https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/509

mpg avatar Oct 15 '25 09:10 mpg