Hi tpm2user,
I am not familiar with `openssl.ctx` or ` --key-context`, however I can show you have to load an external private key to the null hierarchy.
1) make sure you are using DER format (binary ASN.1, not PEM). Use `-outform der`.
2) Use `wc_RsaPrivateKeyDecode`
3) `wolfTPM2_RsaKey_WolfToTpm_ex` to load into a WOLFTPM2_KEY.
We have an example here:
https://github.com/wolfSSL/wolfTPM/blob … est.c#L431
However I don't have one loading a PEM or DER to the null hierarchy. I'll see about adding an example for this.
Thanks,
David Garske, wolfSSL