Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qca for openSUSE:Factory checked in at 2023-07-28 22:19:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qca (Old) and /work/SRC/openSUSE:Factory/.qca.new.32662 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qca" Fri Jul 28 22:19:37 2023 rev:9 rq:1101014 version:2.3.7 Changes: -------- --- /work/SRC/openSUSE:Factory/qca/qca.changes 2023-05-05 15:56:46.523909915 +0200 +++ /work/SRC/openSUSE:Factory/.qca.new.32662/qca.changes 2023-07-28 22:19:38.328934148 +0200 @@ -1,0 +2,6 @@ +Tue Jul 25 08:29:57 UTC 2023 - Christophe Marin <christo...@krop.fr> + +- Update to 2.3.7 + * OpenSSL3: don't quit if legacy provider is unavailable + +------------------------------------------------------------------- Old: ---- qca-2.3.6.tar.xz qca-2.3.6.tar.xz.sig New: ---- qca-2.3.7.tar.xz qca-2.3.7.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qca.spec ++++++ --- /var/tmp/diff_new_pack.kiE3R3/_old 2023-07-28 22:19:39.520941393 +0200 +++ /var/tmp/diff_new_pack.kiE3R3/_new 2023-07-28 22:19:39.536941490 +0200 @@ -38,7 +38,7 @@ %define _soversion 2 %bcond_without pkcs11 Name: qca%{pkgname_suffix} -Version: 2.3.6 +Version: 2.3.7 Release: 0 Summary: Qt Cryptographic Architecture 2 License: LGPL-2.1-or-later ++++++ qca-2.3.6.tar.xz -> qca-2.3.7.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qca-2.3.6/.gitlab-ci.yml new/qca-2.3.7/.gitlab-ci.yml --- old/qca-2.3.6/.gitlab-ci.yml 2023-05-01 13:36:00.000000000 +0200 +++ new/qca-2.3.7/.gitlab-ci.yml 2023-07-24 17:36:27.000000000 +0200 @@ -76,6 +76,10 @@ - cmake -G Ninja .. - ninja - QT_PLUGIN_PATH=`pwd`/lib/qca-qt5/ ctest -V + - echo "Now test without the legacy provider" + - ls /usr/lib/x86_64-linux-gnu/ossl-modules/legacy.so + - rm -f /usr/lib/x86_64-linux-gnu/ossl-modules/legacy.so + - QT_PLUGIN_PATH=`pwd`/lib/qca-qt5/ ctest -V clang_format: stage: build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qca-2.3.6/CMakeLists.txt new/qca-2.3.7/CMakeLists.txt --- old/qca-2.3.6/CMakeLists.txt 2023-05-01 13:36:00.000000000 +0200 +++ new/qca-2.3.7/CMakeLists.txt 2023-07-24 17:36:27.000000000 +0200 @@ -13,7 +13,7 @@ set(QCA_LIB_MAJOR_VERSION "2") set(QCA_LIB_MINOR_VERSION "3") -set(QCA_LIB_PATCH_VERSION "6") +set(QCA_LIB_PATCH_VERSION "7") if(POLICY CMP0042) cmake_policy(SET CMP0042 OLD) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qca-2.3.6/plugins/qca-ossl/qca-ossl.cpp new/qca-2.3.7/plugins/qca-ossl/qca-ossl.cpp --- old/qca-2.3.6/plugins/qca-ossl/qca-ossl.cpp 2023-05-01 13:36:00.000000000 +0200 +++ new/qca-2.3.7/plugins/qca-ossl/qca-ossl.cpp 2023-07-24 17:36:27.000000000 +0200 @@ -58,6 +58,8 @@ DSA_free(pointer); } }; + +static bool s_legacyProviderAvailable = false; } // end of anonymous namespace namespace opensslQCAPlugin { @@ -1056,6 +1058,7 @@ opensslPbkdf1Context(const EVP_MD *algorithm, Provider *p, const QString &type) : KDFContext(p, type) { + Q_ASSERT(s_legacyProviderAvailable); m_algorithm = algorithm; m_context = EVP_MD_CTX_new(); EVP_DigestInit(m_context, m_algorithm); @@ -2078,12 +2081,6 @@ md = EVP_sha1(); else if (alg == EMSA3_MD5) md = EVP_md5(); -#ifdef HAVE_OPENSSL_MD2 - else if (alg == EMSA3_MD2) - md = EVP_md2(); -#endif - else if (alg == EMSA3_RIPEMD160) - md = EVP_ripemd160(); else if (alg == EMSA3_SHA224) md = EVP_sha224(); else if (alg == EMSA3_SHA256) @@ -2094,7 +2091,15 @@ md = EVP_sha512(); else if (alg == EMSA3_Raw) { // md = 0 + } else if (s_legacyProviderAvailable) { + if (alg == EMSA3_RIPEMD160) + md = EVP_ripemd160(); +#ifdef HAVE_OPENSSL_MD2 + else if (alg == EMSA3_MD2) + md = EVP_md2(); +#endif } + evp.startSign(md); } @@ -2105,12 +2110,6 @@ md = EVP_sha1(); else if (alg == EMSA3_MD5) md = EVP_md5(); -#ifdef HAVE_OPENSSL_MD2 - else if (alg == EMSA3_MD2) - md = EVP_md2(); -#endif - else if (alg == EMSA3_RIPEMD160) - md = EVP_ripemd160(); else if (alg == EMSA3_SHA224) md = EVP_sha224(); else if (alg == EMSA3_SHA256) @@ -2121,6 +2120,13 @@ md = EVP_sha512(); else if (alg == EMSA3_Raw) { // md = 0 + } else if (s_legacyProviderAvailable) { + if (alg == EMSA3_RIPEMD160) + md = EVP_ripemd160(); +#ifdef HAVE_OPENSSL_MD2 + else if (alg == EMSA3_MD2) + md = EVP_md2(); +#endif } evp.startVerify(md); } @@ -3726,11 +3732,11 @@ break; #ifdef HAVE_OPENSSL_MD2 case NID_md2WithRSAEncryption: - p.sigalgo = QCA::EMSA3_MD2; + p.sigalgo = s_legacyProviderAvailable ? QCA::EMSA3_MD2 : QCA::SignatureUnknown; break; #endif case NID_ripemd160WithRSA: - p.sigalgo = QCA::EMSA3_RIPEMD160; + p.sigalgo = s_legacyProviderAvailable ? QCA::EMSA3_RIPEMD160 : QCA::SignatureUnknown; break; case NID_dsaWithSHA1: p.sigalgo = QCA::EMSA1_SHA1; @@ -4224,11 +4230,11 @@ break; #ifdef HAVE_OPENSSL_MD2 case NID_md2WithRSAEncryption: - p.sigalgo = QCA::EMSA3_MD2; + p.sigalgo = s_legacyProviderAvailable ? QCA::EMSA3_MD2 : QCA::SignatureUnknown; break; #endif case NID_ripemd160WithRSA: - p.sigalgo = QCA::EMSA3_RIPEMD160; + p.sigalgo = s_legacyProviderAvailable ? QCA::EMSA3_RIPEMD160 : QCA::SignatureUnknown; break; case NID_dsaWithSHA1: p.sigalgo = QCA::EMSA1_SHA1; @@ -4422,11 +4428,11 @@ break; #ifdef HAVE_OPENSSL_MD2 case NID_md2WithRSAEncryption: - p.sigalgo = QCA::EMSA3_MD2; + p.sigalgo = s_legacyProviderAvailable ? QCA::EMSA3_MD2 : QCA::SignatureUnknown; break; #endif case NID_ripemd160WithRSA: - p.sigalgo = QCA::EMSA3_RIPEMD160; + p.sigalgo = s_legacyProviderAvailable ? QCA::EMSA3_RIPEMD160 : QCA::SignatureUnknown; break; case NID_dsaWithSHA1: p.sigalgo = QCA::EMSA1_SHA1; @@ -4753,6 +4759,7 @@ MyPKCS12Context(Provider *p) : PKCS12Context(p) { + Q_ASSERT(s_legacyProviderAvailable); } ~MyPKCS12Context() override @@ -6399,24 +6406,26 @@ // Change cipher names KeyLength keyLength() const override { - if (m_type.left(4) == QLatin1String("des-")) { - return KeyLength(8, 8, 1); - } else if (m_type.left(6) == QLatin1String("aes128")) { + if (s_legacyProviderAvailable) { + if (m_type.left(4) == QLatin1String("des-")) { + return KeyLength(8, 8, 1); + } else if (m_type.left(5) == QLatin1String("cast5")) { + return KeyLength(5, 16, 1); + } else if (m_type.left(8) == QLatin1String("blowfish")) { + // Don't know - TODO + return KeyLength(1, 32, 1); + } + } + if (m_type.left(6) == QLatin1String("aes128")) { return KeyLength(16, 16, 1); } else if (m_type.left(6) == QLatin1String("aes192")) { return KeyLength(24, 24, 1); } else if (m_type.left(6) == QLatin1String("aes256")) { return KeyLength(32, 32, 1); - } else if (m_type.left(5) == QLatin1String("cast5")) { - return KeyLength(5, 16, 1); - } else if (m_type.left(8) == QLatin1String("blowfish")) { - // Don't know - TODO - return KeyLength(1, 32, 1); } else if (m_type.left(9) == QLatin1String("tripledes")) { return KeyLength(16, 24, 1); - } else { - return KeyLength(0, 1, 1); } + return KeyLength(0, 1, 1); } protected: @@ -6435,11 +6444,6 @@ #ifdef HAVE_OPENSSL_SHA0 list += QStringLiteral("sha0"); #endif - list += QStringLiteral("ripemd160"); -#ifdef HAVE_OPENSSL_MD2 - list += QStringLiteral("md2"); -#endif - list += QStringLiteral("md4"); list += QStringLiteral("md5"); #ifdef SHA224_DIGEST_LENGTH list += QStringLiteral("sha224"); @@ -6453,9 +6457,17 @@ #ifdef SHA512_DIGEST_LENGTH list += QStringLiteral("sha512"); #endif + if (s_legacyProviderAvailable) { + list += QStringLiteral("ripemd160"); +#ifdef HAVE_OPENSSL_MD2 + list += QStringLiteral("md2"); +#endif + list += QStringLiteral("md4"); #ifdef OBJ_whirlpool - list += QStringLiteral("whirlpool"); + list += QStringLiteral("whirlpool"); #endif + } + return list; } @@ -6504,26 +6516,28 @@ #ifdef HAVE_OPENSSL_AES_CCM list += QStringLiteral("aes256-ccm"); #endif - list += QStringLiteral("blowfish-ecb"); - list += QStringLiteral("blowfish-cbc-pkcs7"); - list += QStringLiteral("blowfish-cbc"); - list += QStringLiteral("blowfish-cfb"); - list += QStringLiteral("blowfish-ofb"); - list += QStringLiteral("tripledes-ecb"); - list += QStringLiteral("tripledes-cbc"); - list += QStringLiteral("des-ecb"); - list += QStringLiteral("des-ecb-pkcs7"); - list += QStringLiteral("des-cbc"); - list += QStringLiteral("des-cbc-pkcs7"); - list += QStringLiteral("des-cfb"); - list += QStringLiteral("des-ofb"); + if (s_legacyProviderAvailable) { + list += QStringLiteral("blowfish-ecb"); + list += QStringLiteral("blowfish-cbc-pkcs7"); + list += QStringLiteral("blowfish-cbc"); + list += QStringLiteral("blowfish-cfb"); + list += QStringLiteral("blowfish-ofb"); + list += QStringLiteral("tripledes-ecb"); + list += QStringLiteral("tripledes-cbc"); + list += QStringLiteral("des-ecb"); + list += QStringLiteral("des-ecb-pkcs7"); + list += QStringLiteral("des-cbc"); + list += QStringLiteral("des-cbc-pkcs7"); + list += QStringLiteral("des-cfb"); + list += QStringLiteral("des-ofb"); #ifndef OPENSSL_NO_CAST - list += QStringLiteral("cast5-ecb"); - list += QStringLiteral("cast5-cbc"); - list += QStringLiteral("cast5-cbc-pkcs7"); - list += QStringLiteral("cast5-cfb"); - list += QStringLiteral("cast5-ofb"); + list += QStringLiteral("cast5-ecb"); + list += QStringLiteral("cast5-cbc"); + list += QStringLiteral("cast5-cbc-pkcs7"); + list += QStringLiteral("cast5-cfb"); + list += QStringLiteral("cast5-ofb"); #endif + } return list; } @@ -6544,7 +6558,9 @@ #ifdef SHA512_DIGEST_LENGTH list += QStringLiteral("hmac(sha512)"); #endif - list += QStringLiteral("hmac(ripemd160)"); + if (s_legacyProviderAvailable) { + list += QStringLiteral("hmac(ripemd160)"); + } return list; } @@ -6618,6 +6634,11 @@ opensslProvider() { openssl_initted = false; +#ifdef OPENSSL_VERSION_MAJOR + s_legacyProviderAvailable = OSSL_PROVIDER_available(nullptr, "legacy"); +#else + s_legacyProviderAvailable = true; +#endif } void init() override @@ -6629,14 +6650,16 @@ #ifdef OPENSSL_VERSION_MAJOR /* Load Multiple providers into the default (NULL) library context */ OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(nullptr, "legacy"); - if (legacy == nullptr) { - printf("Failed to load Legacy provider\n"); + if (s_legacyProviderAvailable && !legacy) { + printf("Failed to load Legacy provider: %s\n", ERR_error_string(ERR_get_error(), nullptr)); exit(EXIT_FAILURE); } OSSL_PROVIDER *deflt = OSSL_PROVIDER_load(nullptr, "default"); if (deflt == nullptr) { - printf("Failed to load Default provider\n"); - OSSL_PROVIDER_unload(legacy); + printf("Failed to load Default provider: %s\n", ERR_error_string(ERR_get_error(), nullptr)); + if (legacy) { + OSSL_PROVIDER_unload(legacy); + } exit(EXIT_FAILURE); } #endif @@ -6691,10 +6714,13 @@ list += all_hash_types(); list += all_mac_types(); list += all_cipher_types(); + if (s_legacyProviderAvailable) { #ifdef HAVE_OPENSSL_MD2 - list += QStringLiteral("pbkdf1(md2)"); + list += QStringLiteral("pbkdf1(md2)"); #endif - list += QStringLiteral("pbkdf1(sha1)"); + list += QStringLiteral("pbkdf1(sha1)"); + list += QStringLiteral("pkcs12"); + } list += QStringLiteral("pbkdf2(sha1)"); list += QStringLiteral("hkdf(sha256)"); list += QStringLiteral("pkey"); @@ -6706,7 +6732,6 @@ list += QStringLiteral("csr"); list += QStringLiteral("crl"); list += QStringLiteral("certcollection"); - list += QStringLiteral("pkcs12"); list += QStringLiteral("tls"); list += QStringLiteral("cms"); list += QStringLiteral("ca"); @@ -6727,14 +6752,6 @@ else if (type == QLatin1String("sha0")) return new opensslHashContext(EVP_sha(), this, type); #endif - else if (type == QLatin1String("ripemd160")) - return new opensslHashContext(EVP_ripemd160(), this, type); -#ifdef HAVE_OPENSSL_MD2 - else if (type == QLatin1String("md2")) - return new opensslHashContext(EVP_md2(), this, type); -#endif - else if (type == QLatin1String("md4")) - return new opensslHashContext(EVP_md4(), this, type); else if (type == QLatin1String("md5")) return new opensslHashContext(EVP_md5(), this, type); #ifdef SHA224_DIGEST_LENGTH @@ -6753,16 +6770,6 @@ else if (type == QLatin1String("sha512")) return new opensslHashContext(EVP_sha512(), this, type); #endif -#ifdef OBJ_whirlpool - else if (type == QLatin1String("whirlpool")) - return new opensslHashContext(EVP_whirlpool(), this, type); -#endif - else if (type == QLatin1String("pbkdf1(sha1)")) - return new opensslPbkdf1Context(EVP_sha1(), this, type); -#ifdef HAVE_OPENSSL_MD2 - else if (type == QLatin1String("pbkdf1(md2)")) - return new opensslPbkdf1Context(EVP_md2(), this, type); -#endif else if (type == QLatin1String("pbkdf2(sha1)")) return new opensslPbkdf2Context(this, type); else if (type == QLatin1String("hkdf(sha256)")) @@ -6787,8 +6794,6 @@ else if (type == QLatin1String("hmac(sha512)")) return new opensslHMACContext(EVP_sha512(), this, type); #endif - else if (type == QLatin1String("hmac(ripemd160)")) - return new opensslHMACContext(EVP_ripemd160(), this, type); else if (type == QLatin1String("aes128-ecb")) return new opensslCipherContext(EVP_aes_128_ecb(), 0, this, type); else if (type == QLatin1String("aes128-cfb")) @@ -6855,44 +6860,6 @@ else if (type == QLatin1String("aes256-ccm")) return new opensslCipherContext(EVP_aes_256_ccm(), 0, this, type); #endif - else if (type == QLatin1String("blowfish-ecb")) - return new opensslCipherContext(EVP_bf_ecb(), 0, this, type); - else if (type == QLatin1String("blowfish-cfb")) - return new opensslCipherContext(EVP_bf_cfb(), 0, this, type); - else if (type == QLatin1String("blowfish-ofb")) - return new opensslCipherContext(EVP_bf_ofb(), 0, this, type); - else if (type == QLatin1String("blowfish-cbc")) - return new opensslCipherContext(EVP_bf_cbc(), 0, this, type); - else if (type == QLatin1String("blowfish-cbc-pkcs7")) - return new opensslCipherContext(EVP_bf_cbc(), 1, this, type); - else if (type == QLatin1String("tripledes-ecb")) - return new opensslCipherContext(EVP_des_ede3(), 0, this, type); - else if (type == QLatin1String("tripledes-cbc")) - return new opensslCipherContext(EVP_des_ede3_cbc(), 0, this, type); - else if (type == QLatin1String("des-ecb")) - return new opensslCipherContext(EVP_des_ecb(), 0, this, type); - else if (type == QLatin1String("des-ecb-pkcs7")) - return new opensslCipherContext(EVP_des_ecb(), 1, this, type); - else if (type == QLatin1String("des-cbc")) - return new opensslCipherContext(EVP_des_cbc(), 0, this, type); - else if (type == QLatin1String("des-cbc-pkcs7")) - return new opensslCipherContext(EVP_des_cbc(), 1, this, type); - else if (type == QLatin1String("des-cfb")) - return new opensslCipherContext(EVP_des_cfb(), 0, this, type); - else if (type == QLatin1String("des-ofb")) - return new opensslCipherContext(EVP_des_ofb(), 0, this, type); -#ifndef OPENSSL_NO_CAST - else if (type == QLatin1String("cast5-ecb")) - return new opensslCipherContext(EVP_cast5_ecb(), 0, this, type); - else if (type == QLatin1String("cast5-cbc")) - return new opensslCipherContext(EVP_cast5_cbc(), 0, this, type); - else if (type == QLatin1String("cast5-cbc-pkcs7")) - return new opensslCipherContext(EVP_cast5_cbc(), 1, this, type); - else if (type == QLatin1String("cast5-cfb")) - return new opensslCipherContext(EVP_cast5_cfb(), 0, this, type); - else if (type == QLatin1String("cast5-ofb")) - return new opensslCipherContext(EVP_cast5_ofb(), 0, this, type); -#endif else if (type == QLatin1String("pkey")) return new MyPKeyContext(this); else if (type == QLatin1String("dlgroup")) @@ -6911,14 +6878,74 @@ return new MyCRLContext(this); else if (type == QLatin1String("certcollection")) return new MyCertCollectionContext(this); - else if (type == QLatin1String("pkcs12")) - return new MyPKCS12Context(this); else if (type == QLatin1String("tls")) return new MyTLSContext(this); else if (type == QLatin1String("cms")) return new CMSContext(this); else if (type == QLatin1String("ca")) return new MyCAContext(this); + + else if (s_legacyProviderAvailable) { + if (type == QLatin1String("blowfish-ecb")) + return new opensslCipherContext(EVP_bf_ecb(), 0, this, type); + else if (type == QLatin1String("blowfish-cfb")) + return new opensslCipherContext(EVP_bf_cfb(), 0, this, type); + else if (type == QLatin1String("blowfish-ofb")) + return new opensslCipherContext(EVP_bf_ofb(), 0, this, type); + else if (type == QLatin1String("blowfish-cbc")) + return new opensslCipherContext(EVP_bf_cbc(), 0, this, type); + else if (type == QLatin1String("blowfish-cbc-pkcs7")) + return new opensslCipherContext(EVP_bf_cbc(), 1, this, type); + else if (type == QLatin1String("tripledes-ecb")) + return new opensslCipherContext(EVP_des_ede3(), 0, this, type); + else if (type == QLatin1String("tripledes-cbc")) + return new opensslCipherContext(EVP_des_ede3_cbc(), 0, this, type); + else if (type == QLatin1String("des-ecb")) + return new opensslCipherContext(EVP_des_ecb(), 0, this, type); + else if (type == QLatin1String("des-ecb-pkcs7")) + return new opensslCipherContext(EVP_des_ecb(), 1, this, type); + else if (type == QLatin1String("des-cbc")) + return new opensslCipherContext(EVP_des_cbc(), 0, this, type); + else if (type == QLatin1String("des-cbc-pkcs7")) + return new opensslCipherContext(EVP_des_cbc(), 1, this, type); + else if (type == QLatin1String("des-cfb")) + return new opensslCipherContext(EVP_des_cfb(), 0, this, type); + else if (type == QLatin1String("des-ofb")) + return new opensslCipherContext(EVP_des_ofb(), 0, this, type); +#ifndef OPENSSL_NO_CAST + else if (type == QLatin1String("cast5-ecb")) + return new opensslCipherContext(EVP_cast5_ecb(), 0, this, type); + else if (type == QLatin1String("cast5-cbc")) + return new opensslCipherContext(EVP_cast5_cbc(), 0, this, type); + else if (type == QLatin1String("cast5-cbc-pkcs7")) + return new opensslCipherContext(EVP_cast5_cbc(), 1, this, type); + else if (type == QLatin1String("cast5-cfb")) + return new opensslCipherContext(EVP_cast5_cfb(), 0, this, type); + else if (type == QLatin1String("cast5-ofb")) + return new opensslCipherContext(EVP_cast5_ofb(), 0, this, type); +#endif + else if (type == QLatin1String("hmac(ripemd160)")) + return new opensslHMACContext(EVP_ripemd160(), this, type); + else if (type == QLatin1String("ripemd160")) + return new opensslHashContext(EVP_ripemd160(), this, type); +#ifdef HAVE_OPENSSL_MD2 + else if (type == QLatin1String("md2")) + return new opensslHashContext(EVP_md2(), this, type); + else if (type == QLatin1String("pbkdf1(md2)")) + return new opensslPbkdf1Context(EVP_md2(), this, type); +#endif + else if (type == QLatin1String("md4")) + return new opensslHashContext(EVP_md4(), this, type); +#ifdef OBJ_whirlpool + else if (type == QLatin1String("whirlpool")) + return new opensslHashContext(EVP_whirlpool(), this, type); +#endif + else if (type == QLatin1String("pbkdf1(sha1)")) + return new opensslPbkdf1Context(EVP_sha1(), this, type); + else if (type == QLatin1String("pkcs12")) + return new MyPKCS12Context(this); + } + return nullptr; } };