Building Qt 4.8 with openssl support

  • Hi! I'm trying to build Qt 4.8 with OpenSSL support. I've never had problems with previous versions of Qt, but I can't get over it now. What I get is this:

    @ssl/qsslsocket_openssl_symbols.cpp: In function 'long int q_SSL_ctrl(SSL*, int, long int, const void*)':
    ssl/qsslsocket_openssl_symbols.cpp:216: error: invalid conversion from 'const void*' to 'void*'
    ssl/qsslsocket_openssl_symbols.cpp:216: error: initializing argument 4 of 'long int SSL_ctrl(SSL*, int, long int, void*)'
    make: *** [.obj/release-shared/qsslsocket_openssl_symbols.o] Error 1@

    It seems from the sources that according to the version of OpenSSL a different definition is expected. For my version, which is 0x009080dfL, Qt expects that function to have a specific definition:

    @#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
    #if OPENSSL_VERSION_NUMBER >= 0x10000000L
    DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return)
    DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, const void *parg, parg, return -1, return)

    but my header defines it like:

    @long SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);@

    I tried to simply change the definition in Qt sources, but at the end I get errors when linking.
    Is this a bug or am I doing something wrong?

  • Which OpenSSL version do you have?

  • Version is 0.9.8 and the define reports 0×009080dfL.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.