Hi There,
I have a doubt about the encryption using the EVP_PKEY estructure.
What happens is that I need get a private key from a Engine. This part is
ok, I got the private key using the ENGINE_load_private_key.
The next step is encrypt a plain text using the EVP_PKEY that I got, but the
unique plain text cypher function I found is RSA_private_encrypt.
I can´t get the RSA key from the EVP_PKEY estructure using the
EVP_PKEY_get1_RSA because the engine, so I tryed use RSA_private encrypt
function that´s way:
return = RSA_private_encrypt(__messageLen,__plainMessage,
out,__pKey->pkey.rsa, RSA_PKCS1_PADDING) where __pKey is a EVP_PKEY private
key, but it didn´t worked, the function had the -1 return value.
What I´m doing wrong? What I need do to encrypt a plain text using a
EVP_PKEY structure?
Thanks,

Fabrício

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to