Re: Error with dgst -sign

2012-03-03 Thread Nacho Álvarez
Hello, right now I am continuing the development of my own PKCS#11 engine to OpenSSL. I had several problems in the past, I had to change if (do_verify) r = EVP_DigestVerifyInit(mctx, pctx, md, e, sigkey); else r = EVP_DigestSignInit(mctx, pctx, md, e, sigkey); for if (do_verify)

Re: Error with dgst -sign

2010-06-30 Thread Nacho Álvarez
I'm sorry very very much, I downloaded 1.0.0 instead of 1.0.0a. In last version I did the changes, compiled and ran OK. thank you very much for your help. 2010/6/29 Dr. Stephen Henson st...@openssl.org On Tue, Jun 29, 2010, Nacho lvarez wrote: Ok, with option disable-capieng (I didn't know

Re: Error with dgst -sign

2010-06-29 Thread Nacho Álvarez
Hi again, Do you say me who change if (do_verify) r = EVP_DigestVerifyInit(mctx, pctx, md, e, sigkey); else r = EVP_DigestSignInit(mctx, pctx, md, e, sigkey); for if (do_verify) r = EVP_DigestVerifyInit(mctx, pctx, md, NULL, sigkey);

Re: Error with dgst -sign

2010-06-29 Thread Dr. Stephen Henson
On Tue, Jun 29, 2010, Nacho lvarez wrote: Hi again, Do you say me who change if (do_verify) r = EVP_DigestVerifyInit(mctx, pctx, md, e, sigkey); else r = EVP_DigestSignInit(mctx, pctx, md, e, sigkey); for if (do_verify)

Re: Error with dgst -sign

2010-06-29 Thread Nacho Álvarez
Ok, with option disable-capieng (I didn't know it) OpenSSL compiles... but I changed e for NULL in those calls (EVP_Digest... in dgst.c file) and the same error occurs: Error setting context 295228:error:260C0065:engine routines:ENGINE_get_pkey_meth:unimplemented public key

Re: Error with dgst -sign

2010-06-29 Thread Dr. Stephen Henson
On Tue, Jun 29, 2010, Nacho lvarez wrote: Ok, with option disable-capieng (I didn't know it) OpenSSL compiles... but I changed e for NULL in those calls (EVP_Digest... in dgst.c file) and the same error occurs: Error setting context 295228:error:260C0065:engine

Error with dgst -sign

2010-06-28 Thread Nacho Álvarez
I think I wrote this mail in a wrong way so I post it again: Hello, when I run: openssl dgst -sha1 -sign id_of_private_key -keyform engine -out file -engine id-engine file-with-data In OpenSSL 0.9.8 when the load privkey function ends, OpenSSL is waiting and do nothing (doesn't invoke

Re: Error with dgst -sign

2010-06-28 Thread Dr. Stephen Henson
On Mon, Jun 28, 2010, Nacho lvarez wrote: I think I wrote this mail in a wrong way so I post it again: Hello, when I run: openssl dgst -sha1 -sign id_of_private_key -keyform engine -out file -engine id-engine file-with-data In OpenSSL 0.9.8 when the load privkey function ends, OpenSSL

Re: Error with dgst -sign

2010-06-28 Thread Nacho Álvarez
It's a custom engine. load privkey is the pointer to function used as argument in the call: ENGINE_set_load_privkey_function (e, load_private_key); This function is called when OpenSSL try to get the command line key argument. In that function I assign the RSA private key (get it from hardware,

Re: Error with dgst -sign

2010-06-28 Thread Dr. Stephen Henson
On Mon, Jun 28, 2010, Nacho lvarez wrote: It's a custom engine. load privkey is the pointer to function used as argument in the call: ENGINE_set_load_privkey_function (e, load_private_key); This function is called when OpenSSL try to get the command line key argument. In that function I