--- src/lib/omniORB/orbcore/ssl/sslContext.cc +++ src/lib/omniORB/orbcore/ssl/sslContext.cc @@ -109,6 +109,7 @@ #include #include #include +#include #include OMNI_EXPORT_LINK_FORCE_SYMBOL(sslContext); @@ -357,11 +362,23 @@ 0x02 }; +#if OPENSSL_VERSION_NUMBER < 0x10100000L dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), 0); dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), 0); if( !dh->p || !dh->g) { OMNIORB_THROW(INITIALIZE,INITIALIZE_TransportError,CORBA::COMPLETED_NO); } +#else + BIGNUM *bn_p, *bn_g; + bn_p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL); + bn_g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL); + if( !bn_p || !bn_g || !DH_set0_pqg(dh, bn_p, NULL, bn_g)) { + DH_free(dh); + BN_free(bn_p); + BN_free(bn_g); + OMNIORB_THROW(INITIALIZE,INITIALIZE_TransportError,CORBA::COMPLETED_NO); + } +#endif SSL_CTX_set_tmp_dh(pd_ctx, dh); DH_free(dh);