Runtime error if dynamically loading SSL_library_init() - Openssl

This is a discussion on Runtime error if dynamically loading SSL_library_init() - Openssl ; Hello there, * Need your help again. * I*am developing*an application*in which I*use openSSL for https support. My application load openSSL*function dynamically (using LoadLibrary(ssleay32.dll)*for example).*It calls a lot of functions*starting with SSL_ and BIO_.***What I noticed that I*can successfully load ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Runtime error if dynamically loading SSL_library_init()

  1. Runtime error if dynamically loading SSL_library_init()

    Hello there,
    *
    Need your help again.
    *
    I*am developing*an application*in which I*use openSSL for https support. My application load openSSL*function dynamically (using LoadLibrary(ssleay32.dll)*for example).*It calls a lot of functions*starting with SSL_ and BIO_.***What I noticed that I*can successfully load any other functions and execute them at runtime except the following three:
    *
    ************* SSL_library_init();
    ************* SSLv23_method();
    ************* SSL_ctx_new(meth);
    *
    For these three,*my application*has to to statically link with them*and then it works for me (even with other openSSL functions dynamically loaded).
    *
    The*code snippet for loading SSL_library_init()*is like this (similarlyfor others):
    ***
    **
    ***** typedef int (*_ssl_library_init) ();
    ***** _ssl_library_init***** _my_SSL_library_init;
    ******_my_SSL_library_init = (_ssl_library_init*)GetProcAddress(ssleay32, "SSL_library_init");
    ***** _my_SSL_library_init();
    *
    I am using openSSL 0.98g in windows XP environemnt.
    *
    Any problem with this approach? What is so special with these three functions?
    *
    Thanks for* your help in advance.
    *
    Ray
    *




  2. Re: Runtime error if dynamically loading SSL_library_init()

    Just to add to my earlier message, the error message I was getting is Access violation.
    *
    Thanks!

    --- On Tue, 10/14/08, Raymond Zhou wrote:

    From: Raymond Zhou
    Subject: Runtime error if dynamically loading SSL_library_init()
    To: openssl-users@openssl.org
    Date: Tuesday, October 14, 2008, 12:18 AM







    Hello there,
    *
    Need your help again.
    *
    I*am developing*an application*in which I*use openSSL for https support. My application load openSSL*function dynamically (using LoadLibrary(ssleay32.dll)*for example).*It calls a lot of functions*starting with SSL_ and BIO_.***What I noticed that I*can successfully load any other functions and execute them at runtime except the following three:
    *
    ************* SSL_library_init();
    ************* SSLv23_method();
    ************* SSL_ctx_new(meth);
    *
    For these three,*my application*has to to statically link with them*and then it works for me (even with other openSSL functions dynamically loaded).
    *
    The*code snippet for loading SSL_library_init()*is like this (similarlyfor others):
    ***
    **
    ***** typedef int (*_ssl_library_init) ();
    ***** _ssl_library_init***** _my_SSL_library_init;
    ******_my_SSL_library_init = (_ssl_library_init*)GetProcAddress(ssleay32, "SSL_library_init");
    ***** _my_SSL_library_init();
    *
    I am using openSSL 0.98g in windows XP environemnt.
    *
    Any problem with this approach? What is so special with these three functions?
    *
    Thanks for* your help in advance.
    *
    Ray
    *





  3. Runtime error if dynamically loading SSL_library_init()

    Anyone can help me on this? Thanks a lot!

    --- On Tue, 10/14/08, Raymond Zhou wrote:

    From: Raymond Zhou
    Subject: Runtime error if dynamically loading SSL_library_init()
    To: openssl-users@openssl.org
    Date: Tuesday, October 14, 2008, 12:18 AM







    Hello there,
    *
    Need your help again.
    *
    I*am developing*an application*in which I*use openSSL for https support. My application load openSSL*function dynamically (using LoadLibrary(ssleay32.dll)*for example).*It calls a lot of functions*starting with SSL_ and BIO_.***What I noticed that I*can successfully load any other functions and execute them at runtime except the following three:
    *
    ************* SSL_library_init();
    ************* SSLv23_method();
    ************* SSL_ctx_new(meth);
    *
    For these three,*my application*has to to statically link with them*and then it works for me (even with other openSSL functions dynamically loaded).
    *
    The*code snippet for loading SSL_library_init()*is like this (similarlyfor others):
    ***
    **
    ***** typedef int (*_ssl_library_init) ();
    ***** _ssl_library_init***** _my_SSL_library_init;
    ******_my_SSL_library_init = (_ssl_library_init*)GetProcAddress(ssleay32, "SSL_library_init");
    ***** _my_SSL_library_init();
    *
    I am using openSSL 0.98g in windows XP environemnt.
    *
    Any problem with this approach? What is so special with these three functions?
    *
    Thanks for* your help in advance.
    *
    Ray
    *





+ Reply to Thread