Update qca-qt5 to 2.3.0

- Rmove useless botan patch. We have not activate the botan plugin.
- Sync LibreSSL patches from Stefan Strog
- Bump shared lib version, symbols were removed

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/qca-qt5/Makefile,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 Makefile
--- Makefile    28 Nov 2019 17:44:07 -0000      1.6
+++ Makefile    22 May 2020 09:40:06 -0000
@@ -2,12 +2,12 @@
 # separate port for Qt5 because it's too different from Qt4 case
 COMMENT =      Qt Cryptographic Architecture
 
-V =            2.2.1
+V =            2.3.0
 DISTNAME =     qca-${V}
 PKGNAME =      qca-qt5-${V}
 CATEGORIES =   security
 
-SHARED_LIBS =  qca-qt5         0.1
+SHARED_LIBS =  qca-qt5         1.0
 
 HOMEPAGE =     https://userbase.kde.org/QCA
 
@@ -32,8 +32,7 @@ CONFIGURE_ARGS =      -DCMAKE_INSTALL_PREFIX=
                        -DBUILD_PLUGINS="none" \
                        -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON \
                        -DQCA_SUFFIX=qt5 \
-                       -Dqca_CERTSTORE=/etc/ssl/cert.pem \
-                       -DQT4_BUILD=OFF
+                       -Dqca_CERTSTORE=/etc/ssl/cert.pem
 
 # Enable plugins (qca checks for "yes")
 CONFIGURE_ARGS +=      -DWITH_ossl_PLUGIN=yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/security/qca-qt5/distinfo,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 distinfo
--- distinfo    28 Nov 2019 17:44:07 -0000      1.2
+++ distinfo    22 May 2020 09:40:06 -0000
@@ -1,2 +1,2 @@
-SHA256 (qca-2.2.1.tar.xz) = 1xbS2OPtjZW72wYfAwgdfQMiBvdGowpNKdchlvUOewI=
-SIZE (qca-2.2.1.tar.xz) = 691676
+SHA256 (qca-2.3.0.tar.xz) = HWjvQaG2Hcl4a+uSOmiQKmJ2p3zO1eXqf/mF7xE5Mtc=
+SIZE (qca-2.3.0.tar.xz) = 729504
Index: patches/patch-plugins_qca-botan_CMakeLists_txt
===================================================================
RCS file: patches/patch-plugins_qca-botan_CMakeLists_txt
diff -N patches/patch-plugins_qca-botan_CMakeLists_txt
--- patches/patch-plugins_qca-botan_CMakeLists_txt      28 Nov 2019 17:44:07 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-plugins_qca-botan_CMakeLists_txt,v 1.1 2019/11/28 17:44:07 
rsadowski Exp $
-
-Fix qca-botan linking.
-
-Index: plugins/qca-botan/CMakeLists.txt
---- plugins/qca-botan/CMakeLists.txt.orig
-+++ plugins/qca-botan/CMakeLists.txt
-@@ -16,6 +16,7 @@ if(BOTAN_FOUND)
-     set_property(TARGET qca-botan  PROPERTY SUFFIX ".dylib")
-   endif()
- 
-+  target_link_directories(qca-botan PRIVATE ${BOTAN_LIBRARY_DIRS})
-   target_link_libraries(qca-botan ${QT_QTCORE_LIBRARY} ${QCA_LIB_NAME} 
${BOTAN_LIBRARIES})
- 
-   if(NOT DEVELOPER_MODE)
Index: patches/patch-plugins_qca-ossl_ossl110-compat_h
===================================================================
RCS file: patches/patch-plugins_qca-ossl_ossl110-compat_h
diff -N patches/patch-plugins_qca-ossl_ossl110-compat_h
--- patches/patch-plugins_qca-ossl_ossl110-compat_h     28 Nov 2019 17:44:07 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-$OpenBSD: patch-plugins_qca-ossl_ossl110-compat_h,v 1.1 2019/11/28 17:44:07 
rsadowski Exp $
-
-LibreSSL 3.0.x support from Stefan Strogin <ste...@gentoo.org>
-
-Index: plugins/qca-ossl/ossl110-compat.h
---- plugins/qca-ossl/ossl110-compat.h.orig
-+++ plugins/qca-ossl/ossl110-compat.h
-@@ -205,22 +205,6 @@ static int RSA_meth_set_priv_dec(RSA_METHOD *rsa, int 
-     return 1;
- }
- 
--static int RSA_meth_set_sign(RSA_METHOD *meth, int (*sign) (int type, const 
unsigned char *m,
--    unsigned int m_length, unsigned char *sigret, unsigned int *siglen, const 
RSA *rsa))
--{
--    if (!meth) return 0;
--    meth->rsa_sign = sign;
--    return 1;
--}
--
--static int RSA_meth_set_verify(RSA_METHOD *meth, int (*verify) (int dtype, 
const unsigned char *m,
--    unsigned int m_length, const unsigned char *sigbuf, unsigned int siglen, 
const RSA *rsa))
--{
--    if (!meth) return 0;
--    meth->rsa_verify = verify;
--    return 1;
--}
--
- static int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish) (RSA *rsa))
- {
-     if (!meth) return 0;
Index: patches/patch-plugins_qca-ossl_qca-ossl_cpp
===================================================================
RCS file: 
/cvs/ports/security/qca-qt5/patches/patch-plugins_qca-ossl_qca-ossl_cpp,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 patch-plugins_qca-ossl_qca-ossl_cpp
--- patches/patch-plugins_qca-ossl_qca-ossl_cpp 28 Nov 2019 17:44:07 -0000      
1.1
+++ patches/patch-plugins_qca-ossl_qca-ossl_cpp 22 May 2020 09:40:06 -0000
@@ -5,36 +5,54 @@ LibreSSL 3.0.x support from Stefan Strog
 Index: plugins/qca-ossl/qca-ossl.cpp
 --- plugins/qca-ossl/qca-ossl.cpp.orig
 +++ plugins/qca-ossl/qca-ossl.cpp
-@@ -62,12 +62,12 @@
- #endif
- 
- // OpenSSL 1.1.0 compatibility macros
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
- #define M_ASN1_IA5STRING_new() ASN1_IA5STRING_new()
- #define RSA_F_RSA_EAY_PRIVATE_DECRYPT RSA_F_RSA_OSSL_PRIVATE_DECRYPT
- #endif
+@@ -41,7 +41,13 @@
+ #include <openssl/pkcs12.h>
+ #include <openssl/ssl.h>
  
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
++#ifndef RSA_F_RSA_OSSL_PRIVATE_DECRYPT
++#define RSA_F_RSA_OSSL_PRIVATE_DECRYPT RSA_F_RSA_EAY_PRIVATE_DECRYPT
++#endif
++
++#ifndef LIBRESSL_VERSION_NUMBER
  #include <openssl/kdf.h>
- #endif
++#endif
+ 
+ using namespace QCA;
  
-@@ -1280,7 +1280,7 @@ class opensslPbkdf2Context : public KDFContext (public
+@@ -1255,6 +1261,7 @@ class opensslPbkdf2Context : public KDFContext (public
  protected:
  };
  
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
++#ifndef LIBRESSL_VERSION_NUMBER
  class opensslHkdfContext : public HKDFContext
  {
- public:
-@@ -7489,7 +7489,7 @@ class opensslProvider : public Provider (public)
+     Q_OBJECT
+@@ -1284,6 +1291,7 @@ class opensslHkdfContext : public HKDFContext (public)
+               return out;
+       }
+ };
++#endif // LIBRESSL_VERSION_NUMBER
+ 
+ class opensslHMACContext : public MACContext
+ {
+@@ -7268,7 +7276,9 @@ class opensslProvider : public Provider (public)
  #endif
-               else if ( type == "pbkdf2(sha1)" )
+               list += QStringLiteral("pbkdf1(sha1)");
+               list += QStringLiteral("pbkdf2(sha1)");
++#ifndef LIBRESSL_VERSION_NUMBER
+               list += QStringLiteral("hkdf(sha256)");
++#endif
+               list += QStringLiteral("pkey");
+               list += QStringLiteral("dlgroup");
+               list += QStringLiteral("rsa");
+@@ -7337,8 +7347,10 @@ class opensslProvider : public Provider (public)
+ #endif
+               else if ( type == QLatin1String("pbkdf2(sha1)") )
                        return new opensslPbkdf2Context( this, type );
--#ifdef OSSL_110
-+#if defined(OSSL_110) && !defined(LIBRESSL_VERSION_NUMBER)
-               else if ( type == "hkdf(sha256)" )
++#ifndef LIBRESSL_VERSION_NUMBER
+               else if ( type == QLatin1String("hkdf(sha256)") )
                        return new opensslHkdfContext( this, type );
- #endif
++#endif
+               else if ( type == QLatin1String("hmac(md5)") )
+                       return new opensslHMACContext( EVP_md5(), this, type );
+               else if ( type == QLatin1String("hmac(sha1)") )
Index: patches/patch-unittest_CMakeLists_txt
===================================================================
RCS file: patches/patch-unittest_CMakeLists_txt
diff -N patches/patch-unittest_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-unittest_CMakeLists_txt       22 May 2020 09:40:06 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: unittest/CMakeLists.txt
+--- unittest/CMakeLists.txt.orig
++++ unittest/CMakeLists.txt
+@@ -22,7 +22,7 @@ add_subdirectory(keystore)
+ add_subdirectory(logger)
+ add_subdirectory(macunittest)
+ add_subdirectory(metatype)
+-add_subdirectory(pgpunittest)
++# add_subdirectory(pgpunittest)
+ add_subdirectory(pipeunittest)
+ add_subdirectory(pkits)
+ add_subdirectory(rsaunittest)
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/security/qca-qt5/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 PLIST
--- pkg/PLIST   1 Nov 2017 11:20:26 -0000       1.2
+++ pkg/PLIST   22 May 2020 09:40:06 -0000
@@ -29,6 +29,6 @@ lib/cmake/Qca-qt5/Qca-qt5Targets.cmake
 lib/pkgconfig/qca2-qt5.pc
 lib/qca-qt5/
 lib/qca-qt5/crypto/
-lib/qca-qt5/crypto/libqca-ossl.so
+@so lib/qca-qt5/crypto/libqca-ossl.so
 lib/qt5/mkspecs/features/crypto.prf
 @man man/man1/qcatool-qt5.1

Reply via email to