I don't know if anyone is actively working on compatibility with the recently-released OpenSSL 1.1, I can't find anything public at least. Here follows some snippets from my own attempts to build znc against OpenSSL 1.1 so as to document many of the problems in one place and provide visibility of the issue for anybody else attempting the same thing.
$> /usr/local/bin/openssl version -a -o
OpenSSL 1.1.0 25 Aug 2016
built on: reproducible build, date unspecified
platform: linux-elf
options: bn(64,32) rc4(1x,char) des(long) idea(int) blowfish(ptr)
compiler: /usr/local/bin/gcc62 -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -D_FORTIFY_SOURCE=2 -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -O3 -gdwarf-2 -gstrict-dwarf -fstack-protector-all -Wformat -Wformat-security -Werror=format-security -I/usr/local/lib/gcc/i686-pc-linux-gnu/6.2.0/include -I/usr/local/lib/gcc/i686-pc-linux-gnu/6.2.0/include-fixed -I/usr/local/include/c++ -Wa,--noexecstack
OPENSSLDIR: "/usr/local/ssl"
ENGINESDIR: "/usr/local/lib/engines-1.1"
$> CC="/usr/local/bin/gcc62" CXX="/usr/local/bin/g++62" LDFLAGS="-L/usr/local/lib -lgcc_s -Wl,-z,now -Wl,-z,relro -L/usr/local/lib" CPPFLAGS="-O3 -gdwarf-2 -gstrict-dwarf -fstack-protector-all -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -I/usr/local/lib/gcc/i686-pc-linux-gnu/6.2.0/include -I/usr/local/lib/gcc/i686-pc-linux-gnu/6.2.0/include-fixed -I/usr/local/include/c++ -fPIE -pie -I/usr/local/include/openssl" PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" ./configure --prefix='/usr' --with-openssl="/usr/local" --disable-zlib --enable-perl
[...snip...]
ZNC 1.6.3 configured
prefix: /usr
debug: no
ipv6: yes
openssl: yes
dns: threads
perl: yes
python: no
swig: not needed
cyrus: no
tcl: no
charset: no (icu-uc not found via pkg-config)
zlib: no
run from src: no
$> make -j1 --ignore-errors --keep-going
[...snip...]
Building module schat...
schat.cpp: In member function ‘virtual void CSChat::OnModCommand(const CString&)’:
schat.cpp:229:30: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if (pSession && pSession->cipher && pSession->cipher->name)
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:229:50: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if (pSession && pSession->cipher && pSession->cipher->name)
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:230:39: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
Table.SetCell("Cipher", pSession->cipher->name);
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:289:30: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if (pSession && pSession->cipher && pSession->cipher->name)
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:289:50: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if (pSession && pSession->cipher && pSession->cipher->name)
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:290:39: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
Table.SetCell("Cipher", pSession->cipher->name);
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
Linking module schat...
g++62: error: schat.o: No such file or directory
[...snip...]
Building core object main...
src/main.cpp:39:8: error: ‘CRYPTO_dynlock_value’ does not name a type
static CRYPTO_dynlock_value *dyn_create_callback(const char *file, int line) {
^~~~~~~~~~~~~~~~~~~~
src/main.cpp:43:41: error: ‘CRYPTO_dynlock_value’ has not been declared
static void dyn_lock_callback(int mode, CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~~~~~~~~~~~~~~~~
src/main.cpp:53:34: error: variable or field ‘dyn_destroy_callback’ declared void
static void dyn_destroy_callback(CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~~~~~~~~~~~~~~~~
src/main.cpp:53:34: error: ‘CRYPTO_dynlock_value’ was not declared in this scope
src/main.cpp:53:56: error: ‘dlock’ was not declared in this scope
static void dyn_destroy_callback(CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~
src/main.cpp:53:63: error: expected primary-expression before ‘const’
static void dyn_destroy_callback(CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~
src/main.cpp:53:81: error: expected primary-expression before ‘int’
static void dyn_destroy_callback(CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~
src/main.cpp:43:13: warning: ‘void dyn_lock_callback(int, int*, const char*, int)’ defined but not used [-Wunused-function]
static void dyn_lock_callback(int mode, CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~~~~~~~~~~~~~
src/main.cpp:35:22: warning: ‘long unsigned int thread_id_callback()’ defined but not used [-Wunused-function]
static unsigned long thread_id_callback() {
^~~~~~~~~~~~~~~~~~
src/main.cpp:27:13: warning: ‘void locking_callback(int, int, const char*, int)’ defined but not used [-Wunused-function]
static void locking_callback(int mode, int type, const char *file, int line) {
^~~~~~~~~~~~~~~~
make: [src/main.o] Error 1 (ignored)
[...snip...]
Building core object Csocket...
src/Csocket.cpp: In function ‘void ShutdownCsocket()’:
src/Csocket.cpp:535:2: warning: ‘void ERR_remove_state(long unsigned int)’ is deprecated [-Wdeprecated-declarations]
ERR_remove_state( 0 );
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/err.h:247:1: note: declared here
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
^
src/Csocket.cpp:535:22: warning: ‘void ERR_remove_state(long unsigned int)’ is deprecated [-Wdeprecated-declarations]
ERR_remove_state( 0 );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/err.h:247:1: note: declared here
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
^
src/Csocket.cpp: In member function ‘virtual bool Csock::SSLClientSetup()’:
src/Csocket.cpp:1485:28: warning: ‘const SSL_METHOD* TLSv1_2_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_2_client_method() );
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1610:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) /* TLSv1.2 */
^
src/Csocket.cpp:1485:50: warning: ‘const SSL_METHOD* TLSv1_2_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_2_client_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1610:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) /* TLSv1.2 */
^
src/Csocket.cpp:1495:28: warning: ‘const SSL_METHOD* TLSv1_1_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_1_client_method() );
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1604:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) /* TLSv1.1 */
^
src/Csocket.cpp:1495:50: warning: ‘const SSL_METHOD* TLSv1_1_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_1_client_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1604:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) /* TLSv1.1 */
^
src/Csocket.cpp:1504:28: warning: ‘const SSL_METHOD* TLSv1_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_client_method() );
^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1598:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */
^
src/Csocket.cpp:1504:48: warning: ‘const SSL_METHOD* TLSv1_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_client_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1598:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */
^
src/Csocket.cpp:1513:48: error: ‘SSLv2_client_method’ was not declared in this scope
m_ssl_ctx = SSL_CTX_new( SSLv2_client_method() );
^
src/Csocket.cpp: In member function ‘SSL_CTX* Csock::SetupServerCTX()’:
src/Csocket.cpp:1610:23: warning: ‘const SSL_METHOD* TLSv1_2_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_2_server_method() );
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1609:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) /* TLSv1.2 */
^
src/Csocket.cpp:1610:45: warning: ‘const SSL_METHOD* TLSv1_2_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_2_server_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1609:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) /* TLSv1.2 */
^
src/Csocket.cpp:1620:23: warning: ‘const SSL_METHOD* TLSv1_1_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_1_server_method() );
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1603:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) /* TLSv1.1 */
^
src/Csocket.cpp:1620:45: warning: ‘const SSL_METHOD* TLSv1_1_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_1_server_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1603:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) /* TLSv1.1 */
^
src/Csocket.cpp:1629:23: warning: ‘const SSL_METHOD* TLSv1_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_server_method() );
^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1597:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) /* TLSv1.0 */
^
src/Csocket.cpp:1629:43: warning: ‘const SSL_METHOD* TLSv1_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_server_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1597:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) /* TLSv1.0 */
^
src/Csocket.cpp:1638:43: error: ‘SSLv2_server_method’ was not declared in this scope
pCTX = SSL_CTX_new( SSLv2_server_method() );
^
src/Csocket.cpp: In member function ‘CString Csock::GetPeerPubKey() const’:
src/Csocket.cpp:2620:26: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if( pSession && pSession->peer )
^~
In file included from ./include/znc/Csocket.h:93:0,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
src/Csocket.cpp:2622:46: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
EVP_PKEY * pKey = X509_get_pubkey( pSession->peer );
^~
In file included from ./include/znc/Csocket.h:93:0,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
src/Csocket.cpp:2626:16: error: invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
switch( pKey->type )
^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:93:16: note: forward declaration of ‘EVP_PKEY {aka struct evp_pkey_st}’
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
src/Csocket.cpp:2630:28: error: invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
hxKey = BN_bn2hex( pKey->pkey.rsa->n );
^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:93:16: note: forward declaration of ‘EVP_PKEY {aka struct evp_pkey_st}’
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
src/Csocket.cpp:2635:28: error: invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
hxKey = BN_bn2hex( pKey->pkey.dsa->pub_key );
^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:93:16: note: forward declaration of ‘EVP_PKEY {aka struct evp_pkey_st}’
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
In file included from ./include/znc/defines.h:24:0,
from ./include/znc/Csocket.h:43,
from src/Csocket.cpp:41:
src/Csocket.cpp:2640:59: error: invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
CS_DEBUG( "Not Prepared for Public Key Type [" << pKey->type << "]" );
^
./include/znc/ZNCDebug.h:38:13: note: in definition of macro ‘DEBUG’
sDebug << f;\
^
src/Csocket.cpp:2640:5: note: in expansion of macro ‘CS_DEBUG’
CS_DEBUG( "Not Prepared for Public Key Type [" << pKey->type << "]" );
^~~~~~~~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:93:16: note: forward declaration of ‘EVP_PKEY {aka struct evp_pkey_st}’
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
src/Csocket.cpp: In member function ‘long int Csock::GetPeerFingerprint(CString&) const’:
src/Csocket.cpp:2670:35: error: invalid use of incomplete type ‘X509 {aka struct x509_st}’
snprintf( buf, 3, "%02x", pCert->sha1_hash[i] );
^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:119:16: note: forward declaration of ‘X509 {aka struct x509_st}’
typedef struct x509_st X509;
^~~~~~~
make: [src/Csocket.o] Error 1 (ignored)
[...snip...]
Building core object Utils...
src/Utils.cpp: In static member function ‘static void CUtils::GenerateCert(FILE*, const CString&)’:
src/Utils.cpp:63:14: warning: ‘RSA* RSA_generate_key(int, long unsigned int, void (*)(int, int, void*), void*)’ is deprecated [-Wdeprecated-declarations]
RSA *pRSA = RSA_generate_key(2048, 0x10001, NULL, NULL);
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/rsa.h:13:0,
from /usr/local/include/openssl/x509.h:31,
from /usr/local/include/openssl/ssl.h:50,
from src/Utils.cpp:21:
/usr/local/include/openssl/rsa.h:193:1: note: declared here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
src/Utils.cpp:63:56: warning: ‘RSA* RSA_generate_key(int, long unsigned int, void (*)(int, int, void*), void*)’ is deprecated [-Wdeprecated-declarations]
RSA *pRSA = RSA_generate_key(2048, 0x10001, NULL, NULL);
^
In file included from /usr/local/include/openssl/rsa.h:13:0,
from /usr/local/include/openssl/x509.h:31,
from /usr/local/include/openssl/ssl.h:50,
from src/Utils.cpp:21:
/usr/local/include/openssl/rsa.h:193:1: note: declared here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
[...snip...]
Building core object SSLVerifyHost...
src/SSLVerifyHost.cpp: In function ‘ZNC_iSECPartners::HostnameValidationResult ZNC_iSECPartners::matches_common_name(const char*, const X509*)’:
src/SSLVerifyHost.cpp:327:29: warning: ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations]
common_name_str = (char *) ASN1_STRING_data(common_name_asn1);
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/bn.h:31:0,
from /usr/local/include/openssl/asn1.h:24,
from /usr/local/include/openssl/objects.h:916,
from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from ./include/znc/Csocket.h:93,
from ./include/znc/SSLVerifyHost.h:22,
from src/SSLVerifyHost.cpp:17:
/usr/local/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
src/SSLVerifyHost.cpp:327:62: warning: ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations]
common_name_str = (char *) ASN1_STRING_data(common_name_asn1);
^
In file included from /usr/local/include/openssl/bn.h:31:0,
from /usr/local/include/openssl/asn1.h:24,
from /usr/local/include/openssl/objects.h:916,
from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from ./include/znc/Csocket.h:93,
from ./include/znc/SSLVerifyHost.h:22,
from src/SSLVerifyHost.cpp:17:
/usr/local/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
src/SSLVerifyHost.cpp: In function ‘ZNC_iSECPartners::HostnameValidationResult ZNC_iSECPartners::matches_subject_alternative_name(const char*, const X509*)’:
src/SSLVerifyHost.cpp:372:30: warning: ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations]
char *dns_name = (char *) ASN1_STRING_data(current_name->d.dNSName);
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/bn.h:31:0,
from /usr/local/include/openssl/asn1.h:24,
from /usr/local/include/openssl/objects.h:916,
from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from ./include/znc/Csocket.h:93,
from ./include/znc/SSLVerifyHost.h:22,
from src/SSLVerifyHost.cpp:17:
/usr/local/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
src/SSLVerifyHost.cpp:372:70: warning: ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations]
char *dns_name = (char *) ASN1_STRING_data(current_name->d.dNSName);
^
In file included from /usr/local/include/openssl/bn.h:31:0,
from /usr/local/include/openssl/asn1.h:24,
from /usr/local/include/openssl/objects.h:916,
from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from ./include/znc/Csocket.h:93,
from ./include/znc/SSLVerifyHost.h:22,
from src/SSLVerifyHost.cpp:17:
/usr/local/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
Linking znc...
g++62: error: src/main.o: No such file or directory
g++62: error: src/Csocket.o: No such file or directory
make: [znc] Error 1 (ignored)
I have not attempted to build the 1.7 master branch (only the official 1.6.3 from http://znc.in/releases/znc-latest.tar.gz), but the errors highlighted above appear to still be present in the code at nearby line numbers and no commits in either znc or upstream Csocket suggest fixes as of yet.
OpenSSL 1.1 was configured with no-comp no-ssl3 no-md4 and I apply a small patch to src/Csocket.cpp guarding #include <openssl/comp.h> to fix#1256. I have no problems building znc against OpenSSL 1.0.2h configured with shared no-comp no-ssl2 no-ssl3 no-md4 (in 1.1 shared is now default and ssl2 is completely removed, so effectively the same configuration). Note also the deprecation warnings, which would turn into errors if OpenSSL 1.1 were to be configured with no-deprecated or --api=1.1 etc.
I may attempt fixing some of these myself, but I fear I know too little C++ to touch things like threading - I'm open to testing though if anyone else comes up with something.
I don't know if anyone is actively working on compatibility with the recently-released OpenSSL 1.1, I can't find anything public at least. Here follows some snippets from my own attempts to build znc against OpenSSL 1.1 so as to document many of the problems in one place and provide visibility of the issue for anybody else attempting the same thing.
```
$> /usr/local/bin/openssl version -a -o
OpenSSL 1.1.0 25 Aug 2016
built on: reproducible build, date unspecified
platform: linux-elf
options: bn(64,32) rc4(1x,char) des(long) idea(int) blowfish(ptr)
compiler: /usr/local/bin/gcc62 -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -D_FORTIFY_SOURCE=2 -DOPENSSLDIR="\"/usr/local/ssl\"" -DENGINESDIR="\"/usr/local/lib/engines-1.1\"" -O3 -gdwarf-2 -gstrict-dwarf -fstack-protector-all -Wformat -Wformat-security -Werror=format-security -I/usr/local/lib/gcc/i686-pc-linux-gnu/6.2.0/include -I/usr/local/lib/gcc/i686-pc-linux-gnu/6.2.0/include-fixed -I/usr/local/include/c++ -Wa,--noexecstack
OPENSSLDIR: "/usr/local/ssl"
ENGINESDIR: "/usr/local/lib/engines-1.1"
$> CC="/usr/local/bin/gcc62" CXX="/usr/local/bin/g++62" LDFLAGS="-L/usr/local/lib -lgcc_s -Wl,-z,now -Wl,-z,relro -L/usr/local/lib" CPPFLAGS="-O3 -gdwarf-2 -gstrict-dwarf -fstack-protector-all -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -I/usr/local/lib/gcc/i686-pc-linux-gnu/6.2.0/include -I/usr/local/lib/gcc/i686-pc-linux-gnu/6.2.0/include-fixed -I/usr/local/include/c++ -fPIE -pie -I/usr/local/include/openssl" PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig" ./configure --prefix='/usr' --with-openssl="/usr/local" --disable-zlib --enable-perl
[...snip...]
ZNC 1.6.3 configured
prefix: /usr
debug: no
ipv6: yes
openssl: yes
dns: threads
perl: yes
python: no
swig: not needed
cyrus: no
tcl: no
charset: no (icu-uc not found via pkg-config)
zlib: no
run from src: no
$> make -j1 --ignore-errors --keep-going
[...snip...]
Building module schat...
schat.cpp: In member function ‘virtual void CSChat::OnModCommand(const CString&)’:
schat.cpp:229:30: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if (pSession && pSession->cipher && pSession->cipher->name)
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:229:50: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if (pSession && pSession->cipher && pSession->cipher->name)
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:230:39: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
Table.SetCell("Cipher", pSession->cipher->name);
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:289:30: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if (pSession && pSession->cipher && pSession->cipher->name)
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:289:50: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if (pSession && pSession->cipher && pSession->cipher->name)
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
schat.cpp:290:39: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
Table.SetCell("Cipher", pSession->cipher->name);
^~
In file included from ./../include/znc/Csocket.h:93:0,
from ./../include/znc/Socket.h:21,
from ./../include/znc/Client.h:21,
from ./../include/znc/znc.h:21,
from ./../include/znc/IRCNetwork.h:24,
from schat.cpp:26:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
Linking module schat...
g++62: error: schat.o: No such file or directory
[...snip...]
Building core object main...
src/main.cpp:39:8: error: ‘CRYPTO_dynlock_value’ does not name a type
static CRYPTO_dynlock_value *dyn_create_callback(const char *file, int line) {
^~~~~~~~~~~~~~~~~~~~
src/main.cpp:43:41: error: ‘CRYPTO_dynlock_value’ has not been declared
static void dyn_lock_callback(int mode, CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~~~~~~~~~~~~~~~~
src/main.cpp:53:34: error: variable or field ‘dyn_destroy_callback’ declared void
static void dyn_destroy_callback(CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~~~~~~~~~~~~~~~~
src/main.cpp:53:34: error: ‘CRYPTO_dynlock_value’ was not declared in this scope
src/main.cpp:53:56: error: ‘dlock’ was not declared in this scope
static void dyn_destroy_callback(CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~
src/main.cpp:53:63: error: expected primary-expression before ‘const’
static void dyn_destroy_callback(CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~
src/main.cpp:53:81: error: expected primary-expression before ‘int’
static void dyn_destroy_callback(CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~
src/main.cpp:43:13: warning: ‘void dyn_lock_callback(int, int*, const char*, int)’ defined but not used [-Wunused-function]
static void dyn_lock_callback(int mode, CRYPTO_dynlock_value *dlock, const char *file, int line) {
^~~~~~~~~~~~~~~~~
src/main.cpp:35:22: warning: ‘long unsigned int thread_id_callback()’ defined but not used [-Wunused-function]
static unsigned long thread_id_callback() {
^~~~~~~~~~~~~~~~~~
src/main.cpp:27:13: warning: ‘void locking_callback(int, int, const char*, int)’ defined but not used [-Wunused-function]
static void locking_callback(int mode, int type, const char *file, int line) {
^~~~~~~~~~~~~~~~
make: [src/main.o] Error 1 (ignored)
[...snip...]
Building core object Csocket...
src/Csocket.cpp: In function ‘void ShutdownCsocket()’:
src/Csocket.cpp:535:2: warning: ‘void ERR_remove_state(long unsigned int)’ is deprecated [-Wdeprecated-declarations]
ERR_remove_state( 0 );
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/err.h:247:1: note: declared here
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
^
src/Csocket.cpp:535:22: warning: ‘void ERR_remove_state(long unsigned int)’ is deprecated [-Wdeprecated-declarations]
ERR_remove_state( 0 );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/err.h:247:1: note: declared here
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
^
src/Csocket.cpp: In member function ‘virtual bool Csock::SSLClientSetup()’:
src/Csocket.cpp:1485:28: warning: ‘const SSL_METHOD* TLSv1_2_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_2_client_method() );
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1610:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) /* TLSv1.2 */
^
src/Csocket.cpp:1485:50: warning: ‘const SSL_METHOD* TLSv1_2_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_2_client_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1610:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_client_method(void)) /* TLSv1.2 */
^
src/Csocket.cpp:1495:28: warning: ‘const SSL_METHOD* TLSv1_1_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_1_client_method() );
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1604:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) /* TLSv1.1 */
^
src/Csocket.cpp:1495:50: warning: ‘const SSL_METHOD* TLSv1_1_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_1_client_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1604:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_client_method(void)) /* TLSv1.1 */
^
src/Csocket.cpp:1504:28: warning: ‘const SSL_METHOD* TLSv1_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_client_method() );
^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1598:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */
^
src/Csocket.cpp:1504:48: warning: ‘const SSL_METHOD* TLSv1_client_method()’ is deprecated [-Wdeprecated-declarations]
m_ssl_ctx = SSL_CTX_new( TLSv1_client_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1598:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_client_method(void)) /* TLSv1.0 */
^
src/Csocket.cpp:1513:48: error: ‘SSLv2_client_method’ was not declared in this scope
m_ssl_ctx = SSL_CTX_new( SSLv2_client_method() );
^
src/Csocket.cpp: In member function ‘SSL_CTX* Csock::SetupServerCTX()’:
src/Csocket.cpp:1610:23: warning: ‘const SSL_METHOD* TLSv1_2_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_2_server_method() );
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1609:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) /* TLSv1.2 */
^
src/Csocket.cpp:1610:45: warning: ‘const SSL_METHOD* TLSv1_2_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_2_server_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1609:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_2_server_method(void)) /* TLSv1.2 */
^
src/Csocket.cpp:1620:23: warning: ‘const SSL_METHOD* TLSv1_1_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_1_server_method() );
^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1603:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) /* TLSv1.1 */
^
src/Csocket.cpp:1620:45: warning: ‘const SSL_METHOD* TLSv1_1_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_1_server_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1603:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_1_server_method(void)) /* TLSv1.1 */
^
src/Csocket.cpp:1629:23: warning: ‘const SSL_METHOD* TLSv1_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_server_method() );
^~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1597:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) /* TLSv1.0 */
^
src/Csocket.cpp:1629:43: warning: ‘const SSL_METHOD* TLSv1_server_method()’ is deprecated [-Wdeprecated-declarations]
pCTX = SSL_CTX_new( TLSv1_server_method() );
^
In file included from /usr/local/include/openssl/ct.h:13:0,
from /usr/local/include/openssl/ssl.h:61,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:1597:1: note: declared here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *TLSv1_server_method(void)) /* TLSv1.0 */
^
src/Csocket.cpp:1638:43: error: ‘SSLv2_server_method’ was not declared in this scope
pCTX = SSL_CTX_new( SSLv2_server_method() );
^
src/Csocket.cpp: In member function ‘CString Csock::GetPeerPubKey() const’:
src/Csocket.cpp:2620:26: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
if( pSession && pSession->peer )
^~
In file included from ./include/znc/Csocket.h:93:0,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
src/Csocket.cpp:2622:46: error: invalid use of incomplete type ‘SSL_SESSION {aka struct ssl_session_st}’
EVP_PKEY * pKey = X509_get_pubkey( pSession->peer );
^~
In file included from ./include/znc/Csocket.h:93:0,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ssl.h:228:16: note: forward declaration of ‘SSL_SESSION {aka struct ssl_session_st}’
typedef struct ssl_session_st SSL_SESSION;
^~~~~~~~~~~~~~
src/Csocket.cpp:2626:16: error: invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
switch( pKey->type )
^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:93:16: note: forward declaration of ‘EVP_PKEY {aka struct evp_pkey_st}’
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
src/Csocket.cpp:2630:28: error: invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
hxKey = BN_bn2hex( pKey->pkey.rsa->n );
^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:93:16: note: forward declaration of ‘EVP_PKEY {aka struct evp_pkey_st}’
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
src/Csocket.cpp:2635:28: error: invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
hxKey = BN_bn2hex( pKey->pkey.dsa->pub_key );
^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:93:16: note: forward declaration of ‘EVP_PKEY {aka struct evp_pkey_st}’
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
In file included from ./include/znc/defines.h:24:0,
from ./include/znc/Csocket.h:43,
from src/Csocket.cpp:41:
src/Csocket.cpp:2640:59: error: invalid use of incomplete type ‘EVP_PKEY {aka struct evp_pkey_st}’
CS_DEBUG( "Not Prepared for Public Key Type [" << pKey->type << "]" );
^
./include/znc/ZNCDebug.h:38:13: note: in definition of macro ‘DEBUG’
sDebug << f;\
^
src/Csocket.cpp:2640:5: note: in expansion of macro ‘CS_DEBUG’
CS_DEBUG( "Not Prepared for Public Key Type [" << pKey->type << "]" );
^~~~~~~~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:93:16: note: forward declaration of ‘EVP_PKEY {aka struct evp_pkey_st}’
typedef struct evp_pkey_st EVP_PKEY;
^~~~~~~~~~~
src/Csocket.cpp: In member function ‘long int Csock::GetPeerFingerprint(CString&) const’:
src/Csocket.cpp:2670:35: error: invalid use of incomplete type ‘X509 {aka struct x509_st}’
snprintf( buf, 3, "%02x", pCert->sha1_hash[i] );
^~
In file included from /usr/local/include/openssl/crypto.h:31:0,
from /usr/local/include/openssl/bio.h:20,
from /usr/local/include/openssl/ssl.h:48,
from ./include/znc/Csocket.h:93,
from src/Csocket.cpp:41:
/usr/local/include/openssl/ossl_typ.h:119:16: note: forward declaration of ‘X509 {aka struct x509_st}’
typedef struct x509_st X509;
^~~~~~~
make: [src/Csocket.o] Error 1 (ignored)
[...snip...]
Building core object Utils...
src/Utils.cpp: In static member function ‘static void CUtils::GenerateCert(FILE*, const CString&)’:
src/Utils.cpp:63:14: warning: ‘RSA* RSA_generate_key(int, long unsigned int, void (*)(int, int, void*), void*)’ is deprecated [-Wdeprecated-declarations]
RSA *pRSA = RSA_generate_key(2048, 0x10001, NULL, NULL);
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/rsa.h:13:0,
from /usr/local/include/openssl/x509.h:31,
from /usr/local/include/openssl/ssl.h:50,
from src/Utils.cpp:21:
/usr/local/include/openssl/rsa.h:193:1: note: declared here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
src/Utils.cpp:63:56: warning: ‘RSA* RSA_generate_key(int, long unsigned int, void (*)(int, int, void*), void*)’ is deprecated [-Wdeprecated-declarations]
RSA *pRSA = RSA_generate_key(2048, 0x10001, NULL, NULL);
^
In file included from /usr/local/include/openssl/rsa.h:13:0,
from /usr/local/include/openssl/x509.h:31,
from /usr/local/include/openssl/ssl.h:50,
from src/Utils.cpp:21:
/usr/local/include/openssl/rsa.h:193:1: note: declared here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
[...snip...]
Building core object SSLVerifyHost...
src/SSLVerifyHost.cpp: In function ‘ZNC_iSECPartners::HostnameValidationResult ZNC_iSECPartners::matches_common_name(const char*, const X509*)’:
src/SSLVerifyHost.cpp:327:29: warning: ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations]
common_name_str = (char *) ASN1_STRING_data(common_name_asn1);
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/bn.h:31:0,
from /usr/local/include/openssl/asn1.h:24,
from /usr/local/include/openssl/objects.h:916,
from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from ./include/znc/Csocket.h:93,
from ./include/znc/SSLVerifyHost.h:22,
from src/SSLVerifyHost.cpp:17:
/usr/local/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
src/SSLVerifyHost.cpp:327:62: warning: ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations]
common_name_str = (char *) ASN1_STRING_data(common_name_asn1);
^
In file included from /usr/local/include/openssl/bn.h:31:0,
from /usr/local/include/openssl/asn1.h:24,
from /usr/local/include/openssl/objects.h:916,
from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from ./include/znc/Csocket.h:93,
from ./include/znc/SSLVerifyHost.h:22,
from src/SSLVerifyHost.cpp:17:
/usr/local/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
src/SSLVerifyHost.cpp: In function ‘ZNC_iSECPartners::HostnameValidationResult ZNC_iSECPartners::matches_subject_alternative_name(const char*, const X509*)’:
src/SSLVerifyHost.cpp:372:30: warning: ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations]
char *dns_name = (char *) ASN1_STRING_data(current_name->d.dNSName);
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/openssl/bn.h:31:0,
from /usr/local/include/openssl/asn1.h:24,
from /usr/local/include/openssl/objects.h:916,
from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from ./include/znc/Csocket.h:93,
from ./include/znc/SSLVerifyHost.h:22,
from src/SSLVerifyHost.cpp:17:
/usr/local/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
src/SSLVerifyHost.cpp:372:70: warning: ‘unsigned char* ASN1_STRING_data(ASN1_STRING*)’ is deprecated [-Wdeprecated-declarations]
char *dns_name = (char *) ASN1_STRING_data(current_name->d.dNSName);
^
In file included from /usr/local/include/openssl/bn.h:31:0,
from /usr/local/include/openssl/asn1.h:24,
from /usr/local/include/openssl/objects.h:916,
from /usr/local/include/openssl/evp.h:27,
from /usr/local/include/openssl/x509.h:23,
from /usr/local/include/openssl/ssl.h:50,
from ./include/znc/Csocket.h:93,
from ./include/znc/SSLVerifyHost.h:22,
from src/SSLVerifyHost.cpp:17:
/usr/local/include/openssl/asn1.h:553:1: note: declared here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
Linking znc...
g++62: error: src/main.o: No such file or directory
g++62: error: src/Csocket.o: No such file or directory
make: [znc] Error 1 (ignored)
```
I have not attempted to build the 1.7 master branch (only the official 1.6.3 from http://znc.in/releases/znc-latest.tar.gz), but the errors highlighted above appear to still be present in the code at nearby line numbers and no commits in either znc or upstream Csocket suggest fixes as of yet.
OpenSSL 1.1 was configured with `no-comp no-ssl3 no-md4` and I apply a small patch to src/Csocket.cpp guarding `#include <openssl/comp.h>` to fix #1256. I have no problems building znc against OpenSSL 1.0.2h configured with `shared no-comp no-ssl2 no-ssl3 no-md4` (in 1.1 shared is now default and ssl2 is completely removed, so effectively the same configuration). Note also the deprecation warnings, which would turn into errors if OpenSSL 1.1 were to be configured with `no-deprecated` or `--api=1.1` etc.
I may attempt fixing some of these myself, but I fear I know too little C++ to touch things like threading - I'm open to testing though if anyone else comes up with something.
##
<!-- github-sync-id:174123269 -->
P.S. AFAIK PKG_CONFIG_PATH is separated by :, not by space.
https://wiki.openssl.org/index.php/1.1_API_Changes should help fixing this.
P.S. AFAIK `PKG_CONFIG_PATH` is separated by `:`, not by space.
<!-- github-comment-id:243586333 -->
Thanks for spotting my PKG_CONFIG_PATH misuse, I think it had gone unnoticed because the existing variable was empty.
Thanks for spotting my PKG_CONFIG_PATH misuse, I think it had gone unnoticed because the existing variable was empty.
<!-- github-comment-id:243589052 -->
I've managed to hack at this enough that build errors in src/Csocket.cpp with OpenSSL 1.1 are gone (whether my implementation correctly mimics the previous behaviour is another matter).
Before I tidy up for git and sort out compatibility with earlier OpenSSL, should I worry about pushing upstream in a 1.6-compatible way? If so, I'm still not sure I understand how to do that properly from your brief description in #1256. If not, is there a rough timeline for 1.7 release (since presumably the rest of the OpenSSL 1.1 problems should also be fixed for that)?
I've managed to hack at this enough that build errors in src/Csocket.cpp with OpenSSL 1.1 are gone (whether my implementation correctly mimics the previous behaviour is another matter).
Before I tidy up for git and sort out compatibility with earlier OpenSSL, should I worry about pushing upstream in a 1.6-compatible way? If so, I'm still not sure I understand how to do that properly from your brief description in #1256. If not, is there a rough timeline for 1.7 release (since presumably the rest of the OpenSSL 1.1 problems should also be fixed for that)?
<!-- github-comment-id:243651832 -->
If you have a patch for Csocket, you can paste it, I can fix it to work with 1.6 myself. Probably that'd be the easiest.
No real timeline. Probably next year.
If you have a patch for Csocket, you can paste it, I can fix it to work with 1.6 myself. Probably that'd be the easiest.
<!-- github-comment-id:244214637 -->
Well it's the released 1.6.3 code that I've been hacking on, so it already works with 1.6 anyway. If 1.7 is going to be that far away, I might as well continue based on 1.6 - especially if, as you've implied, it's a possibility for these fixes to be a part of a 1.6 release.
In any case, I think some of the changes are non-trivial enough to want feedback in the form of comments on a pull request that I can update. Not to mention, most of my C++ is just fumbling in the dark based on Java similarities and trawling API docs and osmosis - I could easily have missed something basic!
As things stand now, Csocket is where the bulk of the code changes are (I've found one of my fixes doesn't mimic the previous behaviour, so it's not compiling right now). All the non-Csocket errors and deprecation warnings listed above are dealt with and will be in a pull request shortly (pending your response to my question below).
Is my understanding of the procedure for a 1.6-compatible upstream Csocket push correct: checkout to a new branch the commit referenced by the submodule in znc's 1.6.x branch, commit my fixes, merge Csocket head into my branch as a separate commit, pull req my branch upstream, then eventually you point znc 1.6.x submodule to the last of my commits before the head merge commit?
For znc (not upstream Csocket) patches, should I base my pull request off master and let you deal with cherry-picking to 1.6.x or base off 1.6.x and let you forward-port to master?
Well it's the released 1.6.3 code that I've been hacking on, so it already works with 1.6 anyway. If 1.7 is going to be that far away, I might as well continue based on 1.6 - especially if, as you've implied, it's a possibility for these fixes to be a part of a 1.6 release.
In any case, I think some of the changes are non-trivial enough to want feedback in the form of comments on a pull request that I can update. Not to mention, most of my C++ is just fumbling in the dark based on Java similarities and trawling API docs and osmosis - I could easily have missed something basic!
As things stand now, Csocket is where the bulk of the code changes are (I've found one of my fixes doesn't mimic the previous behaviour, so it's not compiling right now). All the non-Csocket errors and deprecation warnings listed above are dealt with and will be in a pull request shortly (pending your response to my question below).
Is my understanding of the procedure for a 1.6-compatible upstream Csocket push correct: checkout to a new branch the commit referenced by the submodule in znc's 1.6.x branch, commit my fixes, merge Csocket head into my branch as a separate commit, pull req my branch upstream, then eventually you point znc 1.6.x submodule to the last of my commits before the head merge commit?
For znc (not upstream Csocket) patches, should I base my pull request off master and let you deal with cherry-picking to 1.6.x or base off 1.6.x and let you forward-port to master?
<!-- github-comment-id:244339569 -->
2016-09-02 11:23 GMT+01:00 Will Elwood notifications@github.com:
Well it's the released 1.6.3 code that I've been hacking on, so it already
works with 1.6 anyway. If 1.7 is going to be that far away, I might as well
continue based on 1.6 - especially if, as you've implied, it's a
possibility for these fixes to be a part of a 1.6 release.
It may be possible. It depends on the changes required.
In any case, I think some of the changes are non-trivial enough to want
feedback in the form of comments on a pull request that I can update. Not
to mention, most of my C++ is just fumbling in the dark based on Java
similarities and trawling API docs and osmosis - I could easily have missed
something basic!
As things stand now, Csocket is where the bulk of the code changes are
(I've found one of my fixes doesn't mimic the previous behaviour, so it's
not compiling right now). All the non-Csocket errors and deprecation
warnings listed above are dealt with and will be in a pull request shortly
(pending your response to my question below).
Is my understanding of the procedure for a 1.6-compatible upstream Csocket
push correct: checkout to a new branch the commit referenced by the
submodule in znc's 1.6.x branch, commit my fixes, merge Csocket head into
my branch as a separate commit, pull req my branch upstream, then
eventually you point znc 1.6.x submodule to the last of my commits before
the head merge commit?
That works, yes. The simpler solution would be to open pull request
directly from your branch (created from the right commit) to Csocket
upstream, but that requires no conflicts.
For znc (not upstream Csocket) patches, should I base my pull request off
master and let you deal with cherry-picking to 1.6.x or base off 1.6.x and
let you forward-port to master?
base off 1.6.x
2016-09-02 11:23 GMT+01:00 Will Elwood notifications@github.com:
> Well it's the released 1.6.3 code that I've been hacking on, so it already
> works with 1.6 anyway. If 1.7 is going to be that far away, I might as well
> continue based on 1.6 - especially if, as you've implied, it's a
> possibility for these fixes to be a part of a 1.6 release.
It may be possible. It depends on the changes required.
> In any case, I think some of the changes are non-trivial enough to want
> feedback in the form of comments on a pull request that I can update. Not
> to mention, most of my C++ is just fumbling in the dark based on Java
> similarities and trawling API docs and osmosis - I could easily have missed
> something basic!
>
> As things stand now, Csocket is where the bulk of the code changes are
> (I've found one of my fixes doesn't mimic the previous behaviour, so it's
> not compiling right now). All the non-Csocket errors and deprecation
> warnings listed above are dealt with and will be in a pull request shortly
> (pending your response to my question below).
>
> Is my understanding of the procedure for a 1.6-compatible upstream Csocket
> push correct: checkout to a new branch the commit referenced by the
> submodule in znc's 1.6.x branch, commit my fixes, merge Csocket head into
> my branch as a separate commit, pull req my branch upstream, then
> eventually you point znc 1.6.x submodule to the last of my commits before
> the head merge commit?
>
> That works, yes. The simpler solution would be to open pull request
> directly from your branch (created from the right commit) to Csocket
> upstream, but that requires no conflicts.
>
> For znc (not upstream Csocket) patches, should I base my pull request off
> master and let you deal with cherry-picking to 1.6.x or base off 1.6.x and
> let you forward-port to master?
base off 1.6.x
<!-- github-comment-id:244365117 -->
Hi, in case you haven't been following the progress in the complementary Csocket pull req, it was merged last week. jimloco/Csocket@448e18a29e should be suitable for znc 1.6 if you want to complete the OpenSSL 1.1 support.
Hi, in case you haven't been following the progress in the complementary Csocket pull req, it was merged last week. jimloco/Csocket@448e18a29ed383451db3cb648a72da4fcbb3f8e5 should be suitable for znc 1.6 if you want to complete the OpenSSL 1.1 support.
<!-- github-comment-id:260787558 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I don't know if anyone is actively working on compatibility with the recently-released OpenSSL 1.1, I can't find anything public at least. Here follows some snippets from my own attempts to build znc against OpenSSL 1.1 so as to document many of the problems in one place and provide visibility of the issue for anybody else attempting the same thing.
I have not attempted to build the 1.7 master branch (only the official 1.6.3 from http://znc.in/releases/znc-latest.tar.gz), but the errors highlighted above appear to still be present in the code at nearby line numbers and no commits in either znc or upstream Csocket suggest fixes as of yet.
OpenSSL 1.1 was configured with
no-comp no-ssl3 no-md4and I apply a small patch to src/Csocket.cpp guarding#include <openssl/comp.h>to fix #1256. I have no problems building znc against OpenSSL 1.0.2h configured withshared no-comp no-ssl2 no-ssl3 no-md4(in 1.1 shared is now default and ssl2 is completely removed, so effectively the same configuration). Note also the deprecation warnings, which would turn into errors if OpenSSL 1.1 were to be configured withno-deprecatedor--api=1.1etc.I may attempt fixing some of these myself, but I fear I know too little C++ to touch things like threading - I'm open to testing though if anyone else comes up with something.
https://wiki.openssl.org/index.php/1.1_API_Changes should help fixing this.
P.S. AFAIK
PKG_CONFIG_PATHis separated by:, not by space.Thanks for spotting my PKG_CONFIG_PATH misuse, I think it had gone unnoticed because the existing variable was empty.
I've managed to hack at this enough that build errors in src/Csocket.cpp with OpenSSL 1.1 are gone (whether my implementation correctly mimics the previous behaviour is another matter).
Before I tidy up for git and sort out compatibility with earlier OpenSSL, should I worry about pushing upstream in a 1.6-compatible way? If so, I'm still not sure I understand how to do that properly from your brief description in #1256. If not, is there a rough timeline for 1.7 release (since presumably the rest of the OpenSSL 1.1 problems should also be fixed for that)?
No real timeline. Probably next year.
If you have a patch for Csocket, you can paste it, I can fix it to work with 1.6 myself. Probably that'd be the easiest.
Well it's the released 1.6.3 code that I've been hacking on, so it already works with 1.6 anyway. If 1.7 is going to be that far away, I might as well continue based on 1.6 - especially if, as you've implied, it's a possibility for these fixes to be a part of a 1.6 release.
In any case, I think some of the changes are non-trivial enough to want feedback in the form of comments on a pull request that I can update. Not to mention, most of my C++ is just fumbling in the dark based on Java similarities and trawling API docs and osmosis - I could easily have missed something basic!
As things stand now, Csocket is where the bulk of the code changes are (I've found one of my fixes doesn't mimic the previous behaviour, so it's not compiling right now). All the non-Csocket errors and deprecation warnings listed above are dealt with and will be in a pull request shortly (pending your response to my question below).
Is my understanding of the procedure for a 1.6-compatible upstream Csocket push correct: checkout to a new branch the commit referenced by the submodule in znc's 1.6.x branch, commit my fixes, merge Csocket head into my branch as a separate commit, pull req my branch upstream, then eventually you point znc 1.6.x submodule to the last of my commits before the head merge commit?
For znc (not upstream Csocket) patches, should I base my pull request off master and let you deal with cherry-picking to 1.6.x or base off 1.6.x and let you forward-port to master?
2016-09-02 11:23 GMT+01:00 Will Elwood notifications@github.com:
It may be possible. It depends on the changes required.
base off 1.6.x
Hi, in case you haven't been following the progress in the complementary Csocket pull req, it was merged last week. jimloco/Csocket@448e18a29e should be suitable for znc 1.6 if you want to complete the OpenSSL 1.1 support.
Indeed. Thanks for reminding.
Updated the submodule in both branches, 1.6.x and master.