Re: [openssl-users] Validation error on generated csr

2013-03-18 Thread Tim Tassonis
Hi Erwann What you have to do it hash your data, prepare an X509_SIG object, set its algor to SHA1 (with NULL parameters), and fill the digest part with your hash result. Then transform it into DER, and sign it with CKM_RSA_PKCS mechanism. Thanks a lot for the explanation. However, I can't

Re: [openssl-users] Validation error on generated csr

2013-03-18 Thread Dr. Stephen Henson
On Mon, Mar 18, 2013, Tim Tassonis wrote: Hi Erwann What you have to do it hash your data, prepare an X509_SIG object, set its algor to SHA1 (with NULL parameters), and fill the digest part with your hash result. Then transform it into DER, and sign it with CKM_RSA_PKCS mechanism.

Re: [openssl-users] Validation error on generated csr

2013-03-18 Thread Tim Tassonis
Hi Stephen Thanks a lot, that did the trick, the verify now returns ok. Kind regards Tim On 03/18/2013 02:26 PM, Dr. Stephen Henson wrote: On Mon, Mar 18, 2013, Tim Tassonis wrote: Hi Erwann What you have to do it hash your data, prepare an X509_SIG object, set its algor to SHA1 (with

Re: [openssl-users] Validation error on generated csr

2013-03-15 Thread Erwann Abalea
Bonjour, Le 15/03/2013 14:07, Tim Tassonis a écrit : Hi I am trying to generate a csr in a c program by having the signing part done by pkcs11 calls, and while I get no errors, the resulting csr fails upon validation: $ openssl req -verify -in wltx.csr verify failure