Bug 217246 - lang/phantomjs: fails to build with libreSSL
Summary: lang/phantomjs: fails to build with libreSSL
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Felder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-20 10:19 UTC by informatik
Modified: 2018-01-10 04:27 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (feld)


Attachments
allow compilation with libreSSL/no 'SSL_CTRL_SET_CURVES' (1.08 KB, patch)
2017-02-20 10:19 UTC, informatik
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description informatik 2017-02-20 10:19:10 UTC
Created attachment 180158 [details]
allow compilation with libreSSL/no 'SSL_CTRL_SET_CURVES'

phantomjs comes with bundled QT with checks for 'SSL_CTRL_SET_CURVES' during build, which is not present/defined in libreSSL, so the build fails with:

.obj/qsslcontext_openssl.o ssl/qsslcontext_openssl.cpp
ssl/qsslcontext_openssl.cpp:347:33: error: use of undeclared identifier 'SSL_CTRL_SET_CURVES'
                                SSL_CTRL_SET_CURVES,
                                ^
1 error generated.
*** [.obj/qsslcontext_openssl.o] Error code 1

The attached patch from https://bugreports.qt.io/browse/QTBUG-46292 fixes this.
Comment 1 informatik 2017-02-20 10:21:03 UTC
Comment on attachment 180158 [details]
allow compilation with libreSSL/no 'SSL_CTRL_SET_CURVES'

--- src/qt/qtbase/src/network/ssl/qsslcontext_openssl.cpp
+++ src/qt/qtbase/src/network/ssl/qsslcontext_openssl.cpp
@@ -338,7 +338,7 @@ init_context:
 
     const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
     if (!qcurves.isEmpty()) {
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
         // Set the curves to be used
         if (q_SSLeay() >= 0x10002000L) {
             // SSL_CTX_ctrl wants a non-const pointer as last argument,
@@ -352,7 +352,7 @@ init_context:
                 return sslContext;
             }
         } else
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
+#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
         {
             // specific curves requested, but not possible to set -> error
             sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-10 04:27:50 UTC
Maintainer feedback?