devel/qca fails to build with libressl. Patch exists with gentoo that could be merged with existing patch. qca-qt5 /wrkdirs/usr/ports/devel/qca/work/qca-2.3.1/plugins/qca-ossl/qca-ossl.cpp:5028:39: error: use of undeclared identifier 'TLS1_3_VERSION' SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION); ^ /wrkdirs/usr/ports/devel/qca/work/qca-2.3.1/plugins/qca-ossl/qca-ossl.cpp:5049:38: error: use of undeclared identifier 'SSL_CIPHER_standard_name'; did you mean 'SSL_CIPHER_get_name'? cipherList += QString::fromLatin1(SSL_CIPHER_standard_name(thisCipher)); ^~~~~~~~~~~~~~~~~~~~~~~~ SSL_CIPHER_get_name /usr/local/include/openssl/ssl.h:1296:14: note: 'SSL_CIPHER_get_name' declared here const char * SSL_CIPHER_get_name(const SSL_CIPHER *c); ^ /wrkdirs/usr/ports/devel/qca/work/qca-2.3.1/plugins/qca-ossl/qca-ossl.cpp:5442:46: error: use of undeclared identifier 'SSL_CIPHER_standard_name'; did you mean 'SSL_CIPHER_get_name'? sessInfo.cipherSuite = QString::fromLatin1(SSL_CIPHER_standard_name(SSL_get_current_cipher(ssl))); ^~~~~~~~~~~~~~~~~~~~~~~~ SSL_CIPHER_get_name /usr/local/include/openssl/ssl.h:1296:14: note: 'SSL_CIPHER_get_name' declared here const char * SSL_CIPHER_get_name(const SSL_CIPHER *c); ^ /wrkdirs/usr/ports/devel/qca/work/qca-2.3.1/plugins/qca-ossl/qca-ossl.cpp:6736:4: warning: 'qsrand' is deprecated: use QRandomGenerator instead [-Wdeprecated-declarations] qsrand(time(nullptr)); ^ /usr/local/include/qt5/QtCore/qglobal.h:1276:15: note: 'qsrand' has been explicitly marked deprecated here Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") void qsrand(uint seed); ^ /usr/local/include/qt5/QtCore/qglobal.h:372:45: note: expanded from macro 'QT_DEPRECATED_VERSION_X_5_15' # define QT_DEPRECATED_VERSION_X_5_15(text) QT_DEPRECATED_X(text) ^ /usr/local/include/qt5/QtCore/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X' # define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text) ^ /usr/local/include/qt5/QtCore/qcompilerdetection.h:675:55: note: expanded from macro 'Q_DECL_DEPRECATED_X' # define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text))) ^ /wrkdirs/usr/ports/devel/qca/work/qca-2.3.1/plugins/qca-ossl/qca-ossl.cpp:6739:9: warning: 'qrand' is deprecated: use QRandomGenerator instead [-Wdeprecated-declarations] n = qrand(); ^ /usr/local/include/qt5/QtCore/qglobal.h:1277:15: note: 'qrand' has been explicitly marked deprecated here Q_CORE_EXPORT QT_DEPRECATED_VERSION_X_5_15("use QRandomGenerator instead") int qrand(); ^ /usr/local/include/qt5/QtCore/qglobal.h:372:45: note: expanded from macro 'QT_DEPRECATED_VERSION_X_5_15' # define QT_DEPRECATED_VERSION_X_5_15(text) QT_DEPRECATED_X(text) ^ /usr/local/include/qt5/QtCore/qglobal.h:294:33: note: expanded from macro 'QT_DEPRECATED_X' # define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text) ^ /usr/local/include/qt5/QtCore/qcompilerdetection.h:675:55: note: expanded from macro 'Q_DECL_DEPRECATED_X' # define Q_DECL_DEPRECATED_X(text) __attribute__ ((__deprecated__(text))) ^ 2 warnings and 3 errors generated. ninja: build stopped: subcommand failed. *** Error code 1
@Reporter Do you have links to the Gentoo issue or patch?
(In reply to Kubilay Kocak from comment #1) These are the patches for qca for libressl compatability from gentoo. https://gitweb.gentoo.org/repo/proj/libressl.git/tree/app-crypt/qca/files (taken from the qca 2.3.0 libressl bug thread https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245116) The merge would be around the final Freebsd patch for qca 2.3.0 which added back in HKDF functionality.
Moin moin (In reply to tjlegg from comment #2) Could you provide an updated patch, that makes it work with libressl? mfg Tobias
Created attachment 217830 [details] This is the gentoo patch applied after make extract and then recreated using make makepatch
Created attachment 219086 [details] Patch from openbsd/gentoo Hello, I tested the patch and qca build fine. However, I had to modify curl so that it could compile with libressl in poudriere. Please, can you confirm?
I'm going to combine this with the QCA 2.3.2 release which was announced this week, and then gently nudge OpenBSD to get this upstreamed.
Upstream MR https://invent.kde.org/libraries/qca/-/issues/7
A commit references this bug: Author: adridg Date: Wed Feb 10 10:46:36 UTC 2021 New revision: 564849 URL: https://svnweb.freebsd.org/changeset/ports/564849 Log: Update devel/qca to latest upstream release QCA is the Qt Cryptographic Architecture - straightforward cross- platform crypto API. This release has: * Add macOS framework major version * qca-gcrypt: Add support for HKDF * Minimum Qt updated to 5.9 * Fixed compilation with gcc 11 While updating, I have added the patch for LibreSSL compatibility (and tried to upsteam it). The patch comes via Gentoo and OpenBSD and has been adjusted by lbartoletti@ and tjlegg@gmail.com and myself, so I'm filling in something generic-ish in "Obtained from" since it is collaborative. The PR: entry is for this patch, not for the update to the recent release. PR: 248590 Reported by: portscout, tjlegg@gmail.com Obtained from: Gentoo/OpenBSD Changes: head/devel/qca/Makefile head/devel/qca/distinfo head/devel/qca/files/patch-plugins_qca-ossl_qca-ossl.cpp
I should mention I didn't touch curl, like lbartoletti@ did in the patch: I built curl without the TLS-SRTP option instead. It's worth a separate PR for the curl folks to figure out if that IGNORE block still applies with current libressl.