Thanks for reply, Dave.

I was trying to understand the functions EVP_* last week, and your
suggestion is pretty usefull because now I know it's possible make it work. 

I was following the main function in genpkey.c file and following the same
sequence for generating key pair. I've got some executing erros that took me
some hours to get it. I still have the problem and I think it might be some
errors in openssl libs.

In fact, I'm developing a library (*.dll and *.so) that make SSL connectios
(already working) and exports some usefull tools for an App. The App has
some specific features that uses the library. For example, An user selects a
document using the App, sign it and send it for a server, where the two last
tasks is provided by dll.

So, why all this? 

Because the App can't load the library with the following lines on dll code:

1. EVP_PKEY_CTX *ctx;
2. EVP_PKEY *pkey = NULL;
3. ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL);  

If the third line is commented, then the library is loaded and everything
works.

Instead this three lines, with the next two lines the App can also load the
dll and it works:

4. RSA *rsa;
5. rsa = RSA_new_method(NULL);

Therefore, I'm developing using RSA_* functions now, and I think it will
work just fine. 

It seems to be an error with some pointer from EVP_* functions. Any EVP_*
function called causes this error.

Anyway, as you said the EVC functions where recent development effort
foccus, I think this may be some error in openssl lib. I also think it might
be openssl version problem or some cross-compiling error.

In any case, if it's possible I'm not importing or compiling the openssl
libs properly, please let me know. Maibe some directive before compiling
openssl, e.g. 
I'm using Openssl version 1.0.1c

NOTICE: I'm including evp.h and rsa.h files in my header.

Thanks again.

Regards
Leonardo

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

Reply via email to