diff --git a/.gitignore b/.gitignore index c51d13f..c0f530c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ xca-0.8.1.tar.gz /xca-2.3.0.tar.gz /xca-2.4.0.tar.gz /xca-2.5.0.tar.gz +/xca-2.6.0.tar.gz diff --git a/sources b/sources index c48f1e0..e48068e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (xca-2.5.0.tar.gz) = 36b9b97ff0649934fbe78e38048e75883555aab5d86ee2cbd629f9789326d16463f182cf0bbcc76b1ac8f631b24fa187f1b64c466e04de010724ea5f9ebfa11e +SHA512 (xca-2.6.0.tar.gz) = 0904df3095cd1cce3c1d19320f207f1997378776728767201a791680d7b937fd947bfdb887cbc7dd4d9ffa18178807cba7844245cf65c84591af7af287ed531e diff --git a/xca-2.5-delete_after_revoke.patch b/xca-2.5-delete_after_revoke.patch deleted file mode 100644 index 45d33a8..0000000 --- a/xca-2.5-delete_after_revoke.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -Naurp xca-2.5.0.orig/lib/db_x509.cpp xca-2.5.0.new/lib/db_x509.cpp ---- xca-2.5.0.orig/lib/db_x509.cpp 2023-09-24 20:22:03.000000000 +0200 -+++ xca-2.5.0.new/lib/db_x509.cpp 2024-01-22 08:22:11.704982550 +0100 -@@ -768,13 +768,15 @@ void db_x509::certRenewal(QModelIndexLis - newcert->sign(signkey, oldcert->getDigest()); - newcert = dynamic_cast(insert(newcert)); - createSuccess(newcert); -- -- // delete old certificate if requested -- if (doReplace) -- deletePKI(idx); - } - if (doRevoke) - do_revoke(indexes, r); -+ -+ // delete old certificates if requested -+ if (doReplace) -+ foreach(idx, indexes) -+ if (fromIndex(idx)) -+ deletePKI(idx); - } - catch (errorEx &err) { - XCA_ERROR(err); diff --git a/xca-2.5-pastekey.patch b/xca-2.5-pastekey.patch deleted file mode 100644 index 78205e3..0000000 --- a/xca-2.5-pastekey.patch +++ /dev/null @@ -1,90 +0,0 @@ -From d29d55ab20509d3e7d279f1fcd85374b5fecdcd8 Mon Sep 17 00:00:00 2001 -From: Christian Hohnstaedt -Date: Thu, 2 Nov 2023 14:06:12 +0100 -Subject: [PATCH] Close #477: paste an encrypted private key results in a crash - -Improve error- and password handling: - - Also identify: (ERR_LIB_PROV:PROV_R_BAD_DECRYPT) as password error. - - Do not use the OpenSSL internal bitfield definition (0xff000fff) - but the official API: ERR_GET_LIB(), ERR_GET_REASON() - Especially ERR_LIB_OFFSET changed from 24 to 23 in Openssl 3.0.0 - - First check for "Cancel", then for invalid password to avoid - an "Invalid Password" message after aborting the password input dialog. ---- - lib/pki_evp.cpp | 16 +++++++++++----- - lib/pki_multi.cpp | 3 +++ - 2 files changed, 14 insertions(+), 5 deletions(-) - -diff --git a/lib/pki_evp.cpp b/lib/pki_evp.cpp -index d2097ed2..54846d5c 100644 ---- a/lib/pki_evp.cpp -+++ b/lib/pki_evp.cpp -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - Passwd pki_evp::passwd; - -@@ -213,10 +214,14 @@ pki_evp::pki_evp(EVP_PKEY *pkey) - - bool pki_evp::openssl_pw_error() const - { -- switch (ERR_peek_error() & 0xff000fff) { -+ unsigned long e = ERR_peek_error(); -+ -+ switch (ERR_PACK(ERR_GET_LIB(e), 0, ERR_GET_REASON(e))) { - case ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_DECRYPT): - case ERR_PACK(ERR_LIB_PEM, 0, PEM_R_BAD_PASSWORD_READ): - case ERR_PACK(ERR_LIB_EVP, 0, EVP_R_BAD_DECRYPT): -+ case ERR_PACK(ERR_LIB_PROV, 0, PROV_R_BAD_DECRYPT): -+ case ERR_PACK(ERR_LIB_PKCS12, 0, PKCS12_R_PKCS12_CIPHERFINAL_ERROR): - pki_ign_openssl_error(); - return true; - } -@@ -230,14 +235,15 @@ void pki_evp::fromPEMbyteArray(const QByteArray &ba, const QString &name) - tr("Please enter the password to decrypt the private key %1.") - .arg(name)); - pkey = load_ssh_ed25519_privatekey(ba, p); -+ pki_ign_openssl_error(); - - while (!pkey) { - pkey = PEM_read_bio_PrivateKey(BioByteArray(ba).ro(), NULL, - PwDialogCore::pwCallback, &p); -- if (openssl_pw_error()) -- XCA_PASSWD_ERROR(); - if (p.getResult() != pw_ok) - throw p.getResult(); -+ if (openssl_pw_error()) -+ XCA_PASSWD_ERROR(); - if (pki_ign_openssl_error()) - break; - } -@@ -396,10 +402,10 @@ void pki_evp::fload(const QString &fname) - do { - pkey = PEM_read_bio_PrivateKey(BioByteArray(ba).ro(), - NULL, cb, &p); -- if (openssl_pw_error()) -- XCA_PASSWD_ERROR(); - if (p.getResult() != pw_ok) - throw p.getResult(); -+ if (openssl_pw_error()) -+ XCA_PASSWD_ERROR(); - if (pki_ign_openssl_error()) - break; - } while (!pkey); -diff --git a/lib/pki_multi.cpp b/lib/pki_multi.cpp -index 1ed81035..f3c6332e 100644 ---- a/lib/pki_multi.cpp -+++ b/lib/pki_multi.cpp -@@ -127,6 +127,9 @@ void pki_multi::fromPEMbyteArray(const QByteArray &_ba, const QString &name) - XCA_ERROR(err); - delete item; - item = NULL; -+ } catch (...) { -+ delete item; -+ item = NULL; - } - ba.remove(0, sizeof BEGIN -1); - } diff --git a/xca-2.5-revokedel.patch b/xca-2.5-revokedel.patch deleted file mode 100644 index c3d3169..0000000 --- a/xca-2.5-revokedel.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 43e1b336d23e7512b246da142c78307baad4cbff Mon Sep 17 00:00:00 2001 -From: Christian Hohnstaedt -Date: Mon, 30 Oct 2023 01:11:30 +0100 -Subject: [PATCH] Fix crash when deleting CA certificates - -If a CA certificate is deleted, all issued certificates must be moved to -an other issuer or the top-level list. - -The CA cert will be taken from the model together with the issued certs -first. Then the issued certs are re-inserted. -To make this work correctly, the issuer must be erased from the issued certs -to be interpreted as insertion and not as move. ---- - lib/db_base.cpp | 2 +- - lib/pki_base.cpp | 5 ++++- - 2 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/lib/db_base.cpp b/lib/db_base.cpp -index 4d7cc87d..a2e4250f 100644 ---- a/lib/db_base.cpp -+++ b/lib/db_base.cpp -@@ -302,7 +302,7 @@ void db_base::insertChild(pki_base *child, pki_base *parent) - if (parent != treeItem && treeview) - idx = index(parent); - -- if (curr_parent) { // && curr_parent != parent) -+ if (curr_parent) { - int row = curr_parent->indexOf(child); - beginMoveRows(index(curr_parent), row, row, idx, 0); - curr_parent->takeChild(child); -diff --git a/lib/pki_base.cpp b/lib/pki_base.cpp -index 62ca3ac5..77722cb2 100644 ---- a/lib/pki_base.cpp -+++ b/lib/pki_base.cpp -@@ -269,7 +269,10 @@ QList pki_base::getChildItems() const - - pki_base *pki_base::takeFirst() - { -- return childItems.takeFirst(); -+ pki_base *pki = childItems.takeFirst(); -+ if (pki) -+ pki->setParent(nullptr); -+ return pki; - } - - QString pki_base::pki_source_name() const diff --git a/xca.spec b/xca.spec index 9860c08..57c0b47 100644 --- a/xca.spec +++ b/xca.spec @@ -3,17 +3,13 @@ Summary: Graphical X.509 certificate management tool Name: xca -Version: 2.5.0 -Release: 3%{?dist} +Version: 2.6.0 +Release: 2%{?dist} License: BSD URL: https://hohnstaedt.de/xca/ Source0: https://github.com/%{gitowner0}/%{gitproject0}/releases/download/RELEASE.%{version}/%{name}-%{version}.tar.gz Source1: xca-2.5.0-README.IMPORTANT -Patch1: xca-2.5-pastekey.patch -Patch2: xca-2.5-revokedel.patch -Patch3: xca-2.5-delete_after_revoke.patch - BuildRequires: cmake BuildRequires: make BuildRequires: gcc-c++ @@ -90,7 +86,6 @@ desktop-file-install --mode 0644 \ --delete-original \ --add-mime-type application/x-xca-database \ --remove-category QT \ - --set-icon=xca \ '%{buildroot}%{_datadir}/applications/xca.desktop' # Tag translation files. @@ -111,6 +106,7 @@ desktop-file-install --mode 0644 \ %{_datadir}/mime/packages/%{name}.* %{_datadir}/applications/* %{_datadir}/bash-completion/ +%{_metainfodir}/* %attr(0644, root, root) %{_mandir}/*/* @@ -118,6 +114,13 @@ desktop-file-install --mode 0644 \ %changelog #------------------------------------------------------------------------------- +* Mon May 6 2024 Patrick Monnerat 2.6.0-2 +- Fix application icon. + https://bugzilla.redhat.com/show_bug.cgi?id=2279161 + +* Sun Mar 17 2024 Patrick Monnerat 2.6.0-1 +- New upstream release. + * Mon Jan 22 2024 Patrick Monnerat 2.5.0-3 - Patch "pastekey" fixes a crash pasting an encrypted private key. https://github.com/chris2511/xca/commit/d29d55a