Index: head/net/qt4-network/Makefile =================================================================== --- head/net/qt4-network/Makefile (revision 483553) +++ head/net/qt4-network/Makefile (revision 483554) @@ -1,61 +1,64 @@ # Created by: lofi@FreeBSD.org # $FreeBSD$ PORTNAME= network DISTVERSION= ${QT4_VERSION} -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= net ipv6 PKGNAMEPREFIX= qt4- MAINTAINER= kde@FreeBSD.org COMMENT= Qt network module LICENSE= GPLv3 LGPL21 LGPL3 GFDL LICENSE_COMB= dual + +BROKEN_SSL= openssl-devel +BROKEN_SSL_REASON_openssl-devel= error: member access into incomplete type 'RSA' (aka 'rsa_st') RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss USES= qmake:no_env qt-dist:4 ssl USE_QT= moc_build rcc_build corelib HAS_CONFIGURE= yes USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL} ALL_TARGET= first CONFIGURE_ENV?= QTDIR=${WRKSRC} PATH=${WRKSRC}/bin:$$PATH MAKE_ENV?= QTDIR=${WRKSRC} LD_LIBRARY_PATH=${WRKSRC}/lib:$$LD_LIBRARY_PATH \ PATH=${WRKSRC}/bin:$$PATH DO_NOT_EXTRACT= demos doc examples mkspecs qmake tools translations \ src/activeqt src/dbus src/gui src/multimedia src/opengl \ src/openvg src/phonon src/qt3support src/s60installs \ src/s60main src/script src/scripttools src/sql src/svg \ src/testlib src/tools src/winmain src/xml src/xmlpatterns \ src/3rdparty/clucene src/3rdparty/freetype \ src/3rdparty/libjpeg src/3rdparty/libmng src/3rdparty/libpng \ src/3rdparty/libtiff src/3rdparty/phonon src/3rdparty/webkit .for dne in ${DO_NOT_EXTRACT} EXTRACT_AFTER_ARGS+= --exclude '${DISTNAME}/${dne}' .endfor BUILD_WRKSRC= ${WRKSRC}/src/${PORTNAME} INSTALL_WRKSRC= ${BUILD_WRKSRC} pre-configure: ${MKDIR} ${WRKSRC}/mkspecs ${LN} -sf ${QMAKE} ${WRKSRC}/bin/qmake ${LN} -sf ${MOC} ${WRKSRC}/bin/moc ${LN} -sf ${RCC} ${WRKSRC}/bin/rcc post-configure: ${REINPLACE_CMD} -e 's|${PREFIX}/${QT_LIBDIR_REL}/pkgconfig|${PREFIX}/libdata/pkgconfig|g' \ -e 's|.*$$(QMAKE).*||g' ${BUILD_WRKSRC}/Makefile ${REINPLACE_CMD} -E -e 's|-L.[^[:space:]]*qt-x11-opensource.[^[:space:]]*lib||g' \ -E -e 's|(.*location=).*moc|\1${PREFIX}/${QT_BINDIR_REL}/${MOC:T}|g' \ -E -e 's|(.*location=).*uic|\1${PREFIX}/${QT_BINDIR_REL}/${UIC:T}|g' \ ${WRKSRC}/lib/pkgconfig/QtNetwork.pc ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/src/network/ssl/qsslsocket_openssl.cpp ${REINPLACE_CMD} -e 's|%%OPENSSLLIB%%|${OPENSSLLIB}|g' \ ${WRKSRC}/src/network/ssl/qsslsocket_openssl_symbols.cpp .include Index: head/net/qt4-network/files/patch-src_network_ssl_qsslcertificate.cpp =================================================================== --- head/net/qt4-network/files/patch-src_network_ssl_qsslcertificate.cpp (revision 483553) +++ head/net/qt4-network/files/patch-src_network_ssl_qsslcertificate.cpp (nonexistent) @@ -1,44 +0,0 @@ ---- src/network/ssl/qsslcertificate.cpp.orig 2015-05-07 14:14:44 UTC -+++ src/network/ssl/qsslcertificate.cpp -@@ -261,7 +261,7 @@ QByteArray QSslCertificate::version() const - QMutexLocker lock(QMutexPool::globalInstanceGet(d.data())); - if (d->versionString.isEmpty() && d->x509) - d->versionString = -- QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1); -+ QByteArray::number(qlonglong(X509_get_version(d->x509)) + 1); - - return d->versionString; - } -@@ -276,7 +276,7 @@ QByteArray QSslCertificate::serialNumber() const - { - QMutexLocker lock(QMutexPool::globalInstanceGet(d.data())); - if (d->serialNumberString.isEmpty() && d->x509) { -- ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber; -+ ASN1_INTEGER *serialNumber = X509_get_serialNumber(d->x509); - // if we cannot convert to a long, just output the hexadecimal number - if (serialNumber->length > 4) { - QByteArray hexString; -@@ -489,19 +489,19 @@ QSslKey QSslCertificate::publicKey() const - QSslKey key; - - key.d->type = QSsl::PublicKey; -- X509_PUBKEY *xkey = d->x509->cert_info->key; -+ X509_PUBKEY *xkey = X509_get_X509_PUBKEY(d->x509); - EVP_PKEY *pkey = q_X509_PUBKEY_get(xkey); - Q_ASSERT(pkey); - -- if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) { -+ if (q_EVP_PKEY_type(EVP_PKEY_id(pkey)) == EVP_PKEY_RSA) { - key.d->rsa = q_EVP_PKEY_get1_RSA(pkey); - key.d->algorithm = QSsl::Rsa; - key.d->isNull = false; -- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) { -+ } else if (q_EVP_PKEY_type(EVP_PKEY_id(pkey)) == EVP_PKEY_DSA) { - key.d->dsa = q_EVP_PKEY_get1_DSA(pkey); - key.d->algorithm = QSsl::Dsa; - key.d->isNull = false; -- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) { -+ } else if (q_EVP_PKEY_type(EVP_PKEY_id(pkey)) == EVP_PKEY_DH) { - // DH unsupported - } else { - // error? Property changes on: head/net/qt4-network/files/patch-src_network_ssl_qsslcertificate.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/qt4-network/files/patch-src_network_ssl_qsslkey.cpp =================================================================== --- head/net/qt4-network/files/patch-src_network_ssl_qsslkey.cpp (revision 483553) +++ head/net/qt4-network/files/patch-src_network_ssl_qsslkey.cpp (nonexistent) @@ -1,17 +0,0 @@ ---- src/network/ssl/qsslkey.cpp.orig 2015-05-07 14:14:44 UTC -+++ src/network/ssl/qsslkey.cpp -@@ -321,8 +321,12 @@ int QSslKey::length() const - { - if (d->isNull) - return -1; -- return (d->algorithm == QSsl::Rsa) -- ? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p); -+ return (d->algorithm == QSsl::Rsa) ? -+#if OPENSSL_VERSION_NUMBER >= 0x10100005L -+ q_BN_num_bits(RSA_get0_n(d->rsa)) : q_BN_num_bits(DSA_get0_p(d->dsa)); -+#else -+ q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p); -+#endif - } - - /*! Property changes on: head/net/qt4-network/files/patch-src_network_ssl_qsslkey.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl.cpp =================================================================== --- head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl.cpp (revision 483553) +++ head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl.cpp (revision 483554) @@ -1,77 +1,31 @@ * Make availability of SSLv3 in Qt4 same as in Qt5, i.e. not part of SecureProtocols * --- src/network/ssl/qsslsocket_openssl.cpp.orig 2015-05-07 14:14:44 UTC +++ src/network/ssl/qsslsocket_openssl.cpp -@@ -222,8 +222,7 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_S - ciph.d->encryptionMethod = descriptionList.at(4).mid(4); - ciph.d->exportable = (descriptionList.size() > 6 && descriptionList.at(6) == QLatin1String("export")); - -- ciph.d->bits = cipher->strength_bits; -- ciph.d->supportedBits = cipher->alg_bits; -+ ciph.d->bits = SSL_CIPHER_get_bits(cipher, &ciph.d->supportedBits); - - } - return ciph; -@@ -267,9 +266,13 @@ init_context: +@@ -267,9 +267,13 @@ init_context: #endif break; case QSsl::SslV3: +#ifndef OPENSSL_NO_SSL3_METHOD ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method()); +#else + ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error +#endif break; - case QSsl::SecureProtocols: // SslV2 will be disabled below + case QSsl::SecureProtocols: // SslV2/3 will be disabled below case QSsl::TlsV1SslV3: // SslV2 will be disabled below case QSsl::AnyProtocol: default: -@@ -297,8 +300,10 @@ init_context: +@@ -297,8 +301,10 @@ init_context: // Enable bug workarounds. long options; - if (configuration.protocol == QSsl::TlsV1SslV3 || configuration.protocol == QSsl::SecureProtocols) + if (configuration.protocol == QSsl::TlsV1SslV3) options = SSL_OP_ALL|SSL_OP_NO_SSLv2; + else if (configuration.protocol == QSsl::SecureProtocols) + options = SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3; else options = SSL_OP_ALL; - -@@ -325,7 +330,7 @@ init_context: - options |= SSL_OP_NO_COMPRESSION; - #endif - -- q_SSL_CTX_set_options(ctx, options); -+ SSL_CTX_set_options(ctx, options); - - // Initialize ciphers - QByteArray cipherString; -@@ -363,7 +368,7 @@ init_context: - // - // See also: QSslContext::fromConfiguration() - if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) { -- q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle()); -+ q_X509_STORE_add_cert(SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle()); - } - } - -@@ -659,13 +664,17 @@ void QSslSocketPrivate::resetDefaultCiphers() - STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl); - for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) { - if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) { -+#if OPENSSL_VERSION_NUMBER < 0x10100005L - if (cipher->valid) { -+#endif - QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher); - if (!ciph.isNull()) { - if (!ciph.name().toLower().startsWith(QLatin1String("adh"))) - ciphers << ciph; - } -+#if OPENSSL_VERSION_NUMBER < 0x10100005L - } -+#endif - } - }