Parag Jhavery wrote:
Hi Group,

I am trying to create a SSL server with the following code.
I am using the function ERR_print_errors_fp  to get the last error in case
of any failure. I want to divert the output to standard output stdout.

For e.g.

if(!SSL_CTX_use_PrivateKey_file(ctx, "privatee.key", SSL_FILETYPE_PEM))
    {
        ERR_print_errors_fp(stdout);
        SSL_CTX_free(ctx);
        return 0;
    }

I am using the OpenSSL 0.9.8g available from
http://www.shininglightpro.com/download/Win32OpenSSL-0_9_8g.exe

This is a Visual studio 6.0 project and I have included the following
libraries in the Project Setting -> Link -> Object\Library module.

1. libeay32MD.lib 2. libeay32MDd.lib 3. libeay32MT.lib 4. libeay32MTd.lib 5. ssleay32MD.lib 6. ssleay32MDd.lib 7. ssleay32MT.lib 8. ssleay32MTd.lib
The compilation and linking process is done without any error.
But while exection the application exits/crashes when execution
ERR_print_errors_fp(stdout).

Any idea what I am doing wrong?

Thanks,
Parag Jhavery



Parag,

You have to choose one of the library versions depending on what kind of application you're building - {Static, Dynamic} {Single Threaded, Multi-threaded} {Debug, Non-debug}.

Using the wrong library can cause problems, either link errors or runtime problems. While your crash may or may not be due to this, it is better to try again with proper build settings.

-jb
--
I used to think I was indecisive, but now I'm not so sure.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to