Simple update qca to the latest version. Our LibreSSL patch has become
significantly smaller.

Feedback?

diff --git a/security/qca-qt5/Makefile b/security/qca-qt5/Makefile
index 1fc09e5c2b1..f52dfc7e9aa 100644
--- a/security/qca-qt5/Makefile
+++ b/security/qca-qt5/Makefile
@@ -1,12 +1,11 @@
 COMMENT =      Qt Cryptographic Architecture
 
-V =            2.3.10
+V =            2.3.12
 DISTNAME =     qca-${V}
 PKGNAME =      qca-qt5-${V}
 CATEGORIES =   security
-REVISION =     0
 
-SHARED_LIBS =  qca-qt5         2.0
+SHARED_LIBS =  qca-qt5         3.0
 
 HOMEPAGE =     https://userbase.kde.org/QCA
 
diff --git a/security/qca-qt5/distinfo b/security/qca-qt5/distinfo
index 6ddd3877a8d..06591f81b49 100644
--- a/security/qca-qt5/distinfo
+++ b/security/qca-qt5/distinfo
@@ -1,2 +1,2 @@
-SHA256 (qca-2.3.10.tar.xz) = HFtyLak9VZNlcZImuxIccm7DwNxMZ96jTx5Q5ODRSgI=
-SIZE (qca-2.3.10.tar.xz) = 764844
+SHA256 (qca-2.3.12.tar.xz) = 1KKzqgJy1z6gxM0hQJYBd/o03cIDDlmkjs+4DHV1csM=
+SIZE (qca-2.3.12.tar.xz) = 767372
diff --git a/security/qca-qt5/patches/patch-plugins_qca-ossl_qca-ossl_cpp 
b/security/qca-qt5/patches/patch-plugins_qca-ossl_qca-ossl_cpp
index 5ee188c083d..9f0b685952b 100644
--- a/security/qca-qt5/patches/patch-plugins_qca-ossl_qca-ossl_cpp
+++ b/security/qca-qt5/patches/patch-plugins_qca-ossl_qca-ossl_cpp
@@ -3,95 +3,19 @@ Fix compilation with LibreSSL
 Index: plugins/qca-ossl/qca-ossl.cpp
 --- plugins/qca-ossl/qca-ossl.cpp.orig
 +++ plugins/qca-ossl/qca-ossl.cpp
-@@ -45,6 +45,11 @@
- #include <openssl/provider.h>
- #endif
+@@ -47,6 +47,11 @@
+ 
+ #include <openssl/kdf.h>
  
 +#ifndef RSA_F_RSA_OSSL_PRIVATE_DECRYPT
 +#define RSA_F_RSA_OSSL_PRIVATE_DECRYPT RSA_F_RSA_EAY_PRIVATE_DECRYPT
 +#define SSL_CIPHER_standard_name SSL_CIPHER_get_name
 +#endif
 +
- #include <openssl/kdf.h>
- 
  using namespace QCA;
-@@ -311,7 +318,7 @@ static void try_get_name_item(X509_NAME *name, int nid
-     while ((loc = X509_NAME_get_index_by_NID(name, nid, loc)) != -1) {
-         X509_NAME_ENTRY *ne   = X509_NAME_get_entry(name, loc);
-         ASN1_STRING     *data = X509_NAME_ENTRY_get_data(ne);
--        QByteArray       cs((const char *)data->data, data->length);
-+        QByteArray       cs((const char *)ASN1_STRING_get0_data(data), 
ASN1_STRING_length(data));
-         info->insert(t, QString::fromLatin1(cs));
-     }
- }
-@@ -328,7 +335,7 @@ try_get_name_item_by_oid(X509_NAME *name, const QStrin
-     while ((loc = X509_NAME_get_index_by_OBJ(name, oid, loc)) != -1) {
-         X509_NAME_ENTRY *ne   = X509_NAME_get_entry(name, loc);
-         ASN1_STRING     *data = X509_NAME_ENTRY_get_data(ne);
--        QByteArray       cs((const char *)data->data, data->length);
-+        QByteArray       cs((const char *)ASN1_STRING_get0_data(data), 
ASN1_STRING_length(data));
-         info->insert(t, QString::fromLatin1(cs));
-         qDebug() << "oid: " << oidText << ",  result: " << cs;
-     }
-@@ -3335,15 +3342,15 @@ class X509Item (public)
- QDateTime ASN1_UTCTIME_QDateTime(const ASN1_UTCTIME *tm, int *isGmt)
- {
-     QDateTime qdt;
--    char     *v;
-+    const char     *v;
-     int       gmt = 0;
-     int       i;
-     int       y = 0, M = 0, d = 0, h = 0, m = 0, s = 0;
-     QDate     qdate;
-     QTime     qtime;
- 
--    i = tm->length;
--    v = (char *)tm->data;
-+    i = ASN1_STRING_length(tm);
-+    v = (const char *)ASN1_STRING_get0_data(tm);
- 
-     if (i < 10)
-         goto auq_err;
-@@ -3716,9 +3723,9 @@ class MyCertContext : public CertContext (public)
- 
-         X509_get0_signature(&signature, nullptr, x);
-         if (signature) {
--            p.sig = QByteArray(signature->length, 0);
--            for (int i = 0; i < signature->length; i++)
--                p.sig[i] = signature->data[i];
-+            p.sig = QByteArray(ASN1_STRING_length(signature), 0);
-+            for (int i = 0; i < ASN1_STRING_length(signature); i++)
-+                p.sig[i] = ASN1_STRING_get0_data(signature)[i];
-         }
- 
-         switch (X509_get_signature_nid(x)) {
-@@ -4214,9 +4221,9 @@ class MyCSRContext : public CSRContext (public)
- 
-         X509_REQ_get0_signature(x, &signature, nullptr);
-         if (signature) {
--            p.sig = QByteArray(signature->length, 0);
--            for (int i = 0; i < signature->length; i++)
--                p.sig[i] = signature->data[i];
-+            p.sig = QByteArray(ASN1_STRING_length(signature), 0);
-+            for (int i = 0; i < ASN1_STRING_length(signature); i++)
-+                p.sig[i] = ASN1_STRING_get0_data(signature)[i];
-         }
- 
-         switch (X509_REQ_get_signature_nid(x)) {
-@@ -4412,9 +4419,9 @@ class MyCRLContext : public CRLContext (public)
- 
-         X509_CRL_get0_signature(x, &signature, nullptr);
-         if (signature) {
--            p.sig = QByteArray(signature->length, 0);
--            for (int i = 0; i < signature->length; i++)
--                p.sig[i] = signature->data[i];
-+            p.sig = QByteArray(ASN1_STRING_length(signature), 0);
-+            for (int i = 0; i < ASN1_STRING_length(signature); i++)
-+                p.sig[i] = ASN1_STRING_get0_data(signature)[i];
-         }
  
-         switch (X509_CRL_get_signature_nid(x)) {
-@@ -6460,7 +6467,7 @@ static QStringList all_hash_types()
+ namespace {
+@@ -6502,7 +6507,7 @@ static QStringList all_hash_types()
          list += QStringLiteral("md2");
  #endif
          list += QStringLiteral("md4");
@@ -100,7 +24,7 @@ Index: plugins/qca-ossl/qca-ossl.cpp
          list += QStringLiteral("whirlpool");
  #endif
      }
-@@ -6921,7 +6928,7 @@ class opensslProvider : public Provider (public)
+@@ -6968,7 +6973,7 @@ class opensslProvider : public Provider (public)
  #endif
              else if (type == QLatin1String("md4"))
                  return new opensslHashContext(EVP_md4(), this, type);
diff --git a/security/qca-qt6/Makefile b/security/qca-qt6/Makefile
index 3c781a6996d..afc85a27c37 100644
--- a/security/qca-qt6/Makefile
+++ b/security/qca-qt6/Makefile
@@ -1,12 +1,11 @@
 COMMENT =      Qt Cryptographic Architecture
 
-V =            2.3.10
+V =            2.3.12
 DISTNAME =     qca-${V}
 PKGNAME =      qca-qt6-${V}
 CATEGORIES =   security
-REVISION =     0
 
-SHARED_LIBS +=  qca-qt6                   0.0 # 0.0
+SHARED_LIBS +=  qca-qt6                   1.0 # 0.0
 
 HOMEPAGE =     https://userbase.kde.org/QCA
 
diff --git a/security/qca-qt6/distinfo b/security/qca-qt6/distinfo
index 6ddd3877a8d..06591f81b49 100644
--- a/security/qca-qt6/distinfo
+++ b/security/qca-qt6/distinfo
@@ -1,2 +1,2 @@
-SHA256 (qca-2.3.10.tar.xz) = HFtyLak9VZNlcZImuxIccm7DwNxMZ96jTx5Q5ODRSgI=
-SIZE (qca-2.3.10.tar.xz) = 764844
+SHA256 (qca-2.3.12.tar.xz) = 1KKzqgJy1z6gxM0hQJYBd/o03cIDDlmkjs+4DHV1csM=
+SIZE (qca-2.3.12.tar.xz) = 767372
diff --git a/security/qca-qt6/patches/patch-plugins_qca-ossl_qca-ossl_cpp 
b/security/qca-qt6/patches/patch-plugins_qca-ossl_qca-ossl_cpp
index 1ea32c55f12..9f0b685952b 100644
--- a/security/qca-qt6/patches/patch-plugins_qca-ossl_qca-ossl_cpp
+++ b/security/qca-qt6/patches/patch-plugins_qca-ossl_qca-ossl_cpp
@@ -3,95 +3,19 @@ Fix compilation with LibreSSL
 Index: plugins/qca-ossl/qca-ossl.cpp
 --- plugins/qca-ossl/qca-ossl.cpp.orig
 +++ plugins/qca-ossl/qca-ossl.cpp
-@@ -45,6 +45,11 @@
- #include <openssl/provider.h>
- #endif
+@@ -47,6 +47,11 @@
+ 
+ #include <openssl/kdf.h>
  
 +#ifndef RSA_F_RSA_OSSL_PRIVATE_DECRYPT
 +#define RSA_F_RSA_OSSL_PRIVATE_DECRYPT RSA_F_RSA_EAY_PRIVATE_DECRYPT
 +#define SSL_CIPHER_standard_name SSL_CIPHER_get_name
 +#endif
 +
- #include <openssl/kdf.h>
- 
  using namespace QCA;
-@@ -311,7 +316,7 @@ static void try_get_name_item(X509_NAME *name, int nid
-     while ((loc = X509_NAME_get_index_by_NID(name, nid, loc)) != -1) {
-         X509_NAME_ENTRY *ne   = X509_NAME_get_entry(name, loc);
-         ASN1_STRING     *data = X509_NAME_ENTRY_get_data(ne);
--        QByteArray       cs((const char *)data->data, data->length);
-+        QByteArray       cs((const char *)ASN1_STRING_get0_data(data), 
ASN1_STRING_length(data));
-         info->insert(t, QString::fromLatin1(cs));
-     }
- }
-@@ -328,7 +333,7 @@ try_get_name_item_by_oid(X509_NAME *name, const QStrin
-     while ((loc = X509_NAME_get_index_by_OBJ(name, oid, loc)) != -1) {
-         X509_NAME_ENTRY *ne   = X509_NAME_get_entry(name, loc);
-         ASN1_STRING     *data = X509_NAME_ENTRY_get_data(ne);
--        QByteArray       cs((const char *)data->data, data->length);
-+        QByteArray       cs((const char *)ASN1_STRING_get0_data(data), 
ASN1_STRING_length(data));
-         info->insert(t, QString::fromLatin1(cs));
-         qDebug() << "oid: " << oidText << ",  result: " << cs;
-     }
-@@ -3335,15 +3340,15 @@ class X509Item (public)
- QDateTime ASN1_UTCTIME_QDateTime(const ASN1_UTCTIME *tm, int *isGmt)
- {
-     QDateTime qdt;
--    char     *v;
-+    const char     *v;
-     int       gmt = 0;
-     int       i;
-     int       y = 0, M = 0, d = 0, h = 0, m = 0, s = 0;
-     QDate     qdate;
-     QTime     qtime;
- 
--    i = tm->length;
--    v = (char *)tm->data;
-+    i = ASN1_STRING_length(tm);
-+    v = (const char *)ASN1_STRING_get0_data(tm);
- 
-     if (i < 10)
-         goto auq_err;
-@@ -3716,9 +3721,9 @@ class MyCertContext : public CertContext (public)
- 
-         X509_get0_signature(&signature, nullptr, x);
-         if (signature) {
--            p.sig = QByteArray(signature->length, 0);
--            for (int i = 0; i < signature->length; i++)
--                p.sig[i] = signature->data[i];
-+            p.sig = QByteArray(ASN1_STRING_length(signature), 0);
-+            for (int i = 0; i < ASN1_STRING_length(signature); i++)
-+                p.sig[i] = ASN1_STRING_get0_data(signature)[i];
-         }
- 
-         switch (X509_get_signature_nid(x)) {
-@@ -4214,9 +4219,9 @@ class MyCSRContext : public CSRContext (public)
- 
-         X509_REQ_get0_signature(x, &signature, nullptr);
-         if (signature) {
--            p.sig = QByteArray(signature->length, 0);
--            for (int i = 0; i < signature->length; i++)
--                p.sig[i] = signature->data[i];
-+            p.sig = QByteArray(ASN1_STRING_length(signature), 0);
-+            for (int i = 0; i < ASN1_STRING_length(signature); i++)
-+                p.sig[i] = ASN1_STRING_get0_data(signature)[i];
-         }
- 
-         switch (X509_REQ_get_signature_nid(x)) {
-@@ -4412,9 +4417,9 @@ class MyCRLContext : public CRLContext (public)
- 
-         X509_CRL_get0_signature(x, &signature, nullptr);
-         if (signature) {
--            p.sig = QByteArray(signature->length, 0);
--            for (int i = 0; i < signature->length; i++)
--                p.sig[i] = signature->data[i];
-+            p.sig = QByteArray(ASN1_STRING_length(signature), 0);
-+            for (int i = 0; i < ASN1_STRING_length(signature); i++)
-+                p.sig[i] = ASN1_STRING_get0_data(signature)[i];
-         }
  
-         switch (X509_CRL_get_signature_nid(x)) {
-@@ -6460,7 +6465,7 @@ static QStringList all_hash_types()
+ namespace {
+@@ -6502,7 +6507,7 @@ static QStringList all_hash_types()
          list += QStringLiteral("md2");
  #endif
          list += QStringLiteral("md4");
@@ -100,7 +24,7 @@ Index: plugins/qca-ossl/qca-ossl.cpp
          list += QStringLiteral("whirlpool");
  #endif
      }
-@@ -6921,7 +6926,7 @@ class opensslProvider : public Provider (public)
+@@ -6968,7 +6973,7 @@ class opensslProvider : public Provider (public)
  #endif
              else if (type == QLatin1String("md4"))
                  return new opensslHashContext(EVP_md4(), this, type);

Reply via email to