This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to format a PSA generated key to PEM?

Hi,
I want to upload the generated key to the modem, which needs PEM.
I know that PSA uses Mbed TLS and know that there is a
mbedtls_pk_write_key_pem
function to get the PEM format.
The problem that it needs mbedtls_pk_context* as identifier.

How can I get mbedtls_pk_context from the by PSA used psa_key_handle_t?

With kind regards,
Árpád



  • Hi Árpád,

    You can obtain the raw key using psa_export_public_key(), but we do not support conversion to PEM in the nRF Connect SDK, and adding support for it is not trivial. We may look into this for a future release. That said, generating a PEM key from a public key is of course possible, but I do not have any method to share about how to do it in the current SDK release.

    Einar

Related