Check, whether EVP_PKEY structure contains private key

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Check, whether EVP_PKEY structure contains private key

Peter Gubis
Hi,

is there any way to determine, whether EVP_PKEY structure contains a private key, after the key was loaded from hsm/token?

I've got a piece of code, where the decision is made on RSA domain parameters included in the structure. Unfortunately Engine/HSM protected private keys doesn't populates some domain parameters to the RSA structure, so this algorithm is not working anymore.

What is correct way to do this? Is there any function similar to EVP_PKEY_type, which can tell me, that key contains private key part, or at least, that it is engine protected/produced key?

Many thanks and best regards,
Peter.