Re: Error with dgst -sign

2012-03-03 Thread Nacho Álvarez
) but it is undocumented and I do not know how to work with that. My aim is to carry out sign and verify with no changes in original OpenSSL source code. Thanks for your help. Kindest regard. El 30 de junio de 2010 10:34, Nacho Álvarez nasin...@gmail.com escribió: I'm sorry very very much, I downloaded 1.0.0

Re: Problem with rsa_keygen

2010-09-24 Thread Nacho Álvarez
I have the engine in a dynamic library and there's not relevant part of the code. If I overwrite rsa_keygen function and if I do something or nothing but return 1 I get segmentation fault but it's not my function, my function ends ok and invokes the return instruction. The example code I wrote is

Re: Problem with rsa_keygen

2010-09-24 Thread Nacho Álvarez
a RSA key. El 24 de septiembre de 2010 10:31, Nacho Álvarez nasin...@gmail.comescribió: I have the engine in a dynamic library and there's not relevant part of the code. If I overwrite rsa_keygen function and if I do something or nothing but return 1 I get segmentation fault but it's not my

Re: Problem with rsa_keygen

2010-09-23 Thread Nacho Álvarez
That's not the problem, I think, because if the only instruction of the function is: int rsa_keygen (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb) { return 1; } I get the segmentation fault when the rsa_keygen ends. But if I return 0 or -1 (errors) OpenSSL reports me error in genrsa and call

Problem with rsa_keygen

2010-09-22 Thread Nacho Álvarez
Hello everybody Several months ago I developed an OpenSSL PKCS#11 engine for Windows XP and it worked ok (it was compiled with MinGW). Now I'm trying to compile it on Linux (Debian 5 with GCC 4.3.1) but I have the next problem: In the overwritten function *rsa_keygen* (whose signature is *int

Problems with cipher in engine

2010-07-05 Thread Nacho Álvarez
Hello everybody, I am having got several problems with ciphers in my engine. 1st: Key, who I recive in the key argument from init function (from evp_cipher_st), is different to the key I write in the command line (Is the key cooked?). 2nd: In the init function (from evp_cipher_st) the key I

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 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

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 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,

Error engine using rsautl

2010-06-25 Thread Nacho Álvarez
Hello, I am building a PKCS#11 engine to an HSM. When I run: openssl rsautl -sign -inkey id-of-private-key -keyform engine -in file-data -out file-sign -engine My-engine-id The engine executes the rsa_priv_enc function (I thought the engine would execute rsa_sign, but this is not the problem).

I don't know to make an Engine to use within OpenSSL application

2010-05-28 Thread Nacho Álvarez
Hello I know how to do an engine implementation that overwrite OpenSLL functionality (like RSA sign and verify, ...) but I want to do an implementation (dll) can be called from OpenSSL (through OpenSSl config file). How do I build this dll for OpenSSL? I don't know the structure of these DLLs.