Hello,

I have an application that decrypts an encrypted PKCS#7 structure.
When I run it with keys loaded from disk, it runs perfectly, but as soon as I use engine keys from CAPI it fails with: 8244:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:.\crypto\evp\evp_enc.c:539:

Note that I am able to sign another package with the key which the server accepts. But the response from the server can't be decrypted with CAPI keys. I looked through the functions of most of the files but I cannot find any possible error for this.
The call is
PKCS7_decrypt(p7enc, recipientkey, recipientcert, outbio, 0)

Which works just fine if recipientkey is not inside the engine.

Any suggestions on debugging this? Could there even be an error in the engine or do I just miss something simple like a padding setting?

Regards,
Florian
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to