Commit Graph

82 Commits

Author SHA1 Message Date
Christian Hohnstaedt
c6304a073d Close #296: Proper plurals
Some checks are pending
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 5.15.2, ubuntu-latest) (push) Waiting to run
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 6.6.2, ubuntu-latest) (push) Waiting to run
CMake / build (build/xca-*.dmg, Unix Makefiles, mac, /opt/homebrew/opt/openssl, macos, 6.6.2, macos-latest) (push) Waiting to run
CMake / build (build/xca-*.msi build/xca-portable-*.zip , MinGW Makefiles, windows, D:\msys2\msys64\mingw64, windows, 5.15.2, windows-2019, win64_mingw81) (push) Waiting to run
Use the provided plural mechanisms of QT.
The "PO" translation also works smoothly and
the translation mechanisms between .po <-> .qt
was tested successfully.

The new english translation file translates
the single phrase:
 "Delete the %n revocation list(s): '%1'?"
into
 "Delete the revocation list: '%1'?" for one item
and
 "Delete the %n revocation lists: '%1'?" otherwise
2024-09-14 10:22:45 +02:00
Christian Hohnstaedt
ec3dec0b44 Relates #88: Select a common or individual passwords
When exporting items into encrypted files, the checkbox
"Same encryption password for all items" may be used to enter
one password once for all items.

Otherwise a new password dialog opens for each exported entry.
2024-09-14 01:13:18 +02:00
Christian Hohnstaedt
46c1b78577 Close #88: Export to multiple files
Extend the ExportFile dialog by a checkbox to
switch between "all-in-one-file" or every item in a separate
file. It is only visible if more than one file is selected.
Activating the checkbox will:
 - Change the file-input into a directory-input and cut off the
   file name
 - Disabling all formats that are intended for multiple items.
De-activating the checkbox will:
 - Change the directory-input back into a file-input
   and append the previously erased file name again.
 - Disabling all export-formats that are only useful for single items.
2024-09-14 01:13:18 +02:00
Christian Hohnstaedt
5a183a11fa 2nd Fixup for flexible clipboard export
Re-enable clipboard-export for Requests, Templates and CRLs.
2024-08-21 16:48:27 +02:00
Christian Hohnstaedt
cc69abbed6 Fixup for flexible clipboard export
Commit 2060d75f51
introduced a segfault.
2024-08-17 13:18:06 +02:00
Christian Hohnstaedt
2060d75f51 Close #395: Flexible Clipboard Export
Generalize the Clipboard format selection
and extend it to certificates.

Certificates may now be exported as chain
or together with private key.

The clipboard format selection also
affects the Drag&Drop content.

The Export->Clipboard men now also shows the
currently selected format export.
2024-04-23 22:01:38 +02:00
Christian Hohnstaedt
a25b6c7402 Close #520: permanent processor load
Improve the timer interval maintenance process:
 - Do not fire every second,
   but at most 1 second after the last run
 - Reduce the fired events.
 - Every container now only evaluates its own elements
   (keys, certs,etc.) instead of each container evaluating all
   items and duplicating work

Disable sorting and resizing in the view during initialization,
to speed up opening the database
2024-02-23 12:24:31 +01:00
Christian Hohnstaedt
0c1c00962f Fix whitespace errors 2023-12-30 11:01:11 +01:00
Christian Hohnstaedt
4fe06de78b Improve error handling in case of a wrong private password
instead of simply doing nothing.
2023-10-25 20:08:52 +02:00
Christian Hohnstaedt
993da2d474 Use C++11 initializers for all non-static class members
When XCA started in 2002, there were no C++ initializers.
Drop explicit initializers from the constructors.

 - Fix indentations of section declarators.
 - Replace NULL by nullptr when feasible.
 - Sort private section: properties first, then methods.
2023-10-08 22:19:18 +02:00
Christian Hohnstaedt
2333b02ddc Close #384: Quick view of certificates without trying to open XCA
The ImportMulti dialog does not show up if there is only
one item to display, but the item is displayed directly.

The displayed items have a new "Import" button to import
directly from the viewed item.

If XCA is called with certs, crls, keys etc. from the commandline
XCA only displays and optionally imports the item if a default
database is given. Afterwards XCA exits.
2023-10-05 23:12:40 +02:00
Christian Hohnstaedt
3a73697406 Drop global pointer to mainwin by fixing its last user db_x509
Instead of querying the view about the selected item,
let the view store the current item in the model.
2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
42b76418fb Enable Warnings and fix them 2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
856032b4a3 Silence warning message 2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
f457a991c6 Reduce debug code 2023-09-24 11:38:06 +02:00
Christian Hohnstaedt
cccc8ee1e3 Close #440: yellow background makes date text hard to read in dark themes
Adapt red and yellow background colors depending on the used theme,
detected by: "Text color lighter than Background color?"
2023-09-23 12:28:15 +02:00
Christian Hohnstaedt
7206024d6a Fix deprecation warnings
The proposed "addAction()" with the KeySequence as 2nd argument
is only available soince Qt6.3 and not compatible with QT5
Change the call in a compatible way and set the shortcut afterwards.
2023-05-14 21:49:13 +02:00
Christian Hohnstaedt
ded935b033 Prepare for Qt6: QRegExp -> QRegularExpression
QRegExp is deprecated and needs special library
in Qt6: core5compat

Replace by QRegularExpression which has been introduced by Qt5
2022-08-31 00:01:06 +02:00
Christian Hohnstädt
6ea01e80f6 Refactor item export: separate GUI and database
Collect all export formats in pki_export.

Each export format has assigned acouple of flags, indicating,
whether they are text, concatenateable, encrypted, usable for
multiple selections or only for a single item.
2021-11-13 14:49:02 +01:00
Christian Hohnstaedt
f2fe9be3f3 Move file loading GUI element out of non-gui container class (db_*)
into GUI View widgets/*TreeView.cpp
2021-10-30 11:51:35 +02:00
Christian Hohnstaedt
e9f36fc72b Move storeItems() from db_base to XcaTeeView 2021-09-09 21:30:06 +02:00
Christian Hohnstädt
56c6df6c90 editComment: Move Gui elements to widgets/XcaTreeView
Another step to separate GUI from functionality
2021-06-19 13:18:48 +02:00
Christian Hohnstaedt
9180a3ea31 Move font information from db_base to TreeView 2021-06-01 17:48:37 +02:00
Christian Hohnstädt
d5fa97c3bb Drop support for Qt4
Version 2.4.0 was the last one with Qt4 support
2021-05-09 12:25:32 +02:00
Christian Hohnstädt
e4f9dd6389 Fix opening new database, while another one is open
Avoid crashes by checking for model being set.
Thoroughly close previous database before opening a new one.
Drop changeDB() function and replace by init_database.
2020-10-14 22:02:48 +02:00
Christian Hohnstaedt
17b621ccef Encapsulate all index.internalPointer() in fromIndex(index) 2020-05-10 09:09:31 +02:00
Christian Hohnstaedt
45f834a6e4 Move tree-handling from db_x509 class to the base class
This is a preparation for possibly inserting
structuring folder elements later.
2020-05-08 17:37:40 +02:00
Christian Hohnstaedt
7c65a786ea Revamp database management
The global variable "Database" of class xca_db
can be used by any other class to access. No need
to provide it.

The "xca_db" class managed the "database_model" pointer.
Accessing the name of the current database has been unified.
2020-05-08 07:47:15 +02:00
Christian Hohnstaedt
5a64725556 Move item store from db_base into separate class "pki_lookup"
Since also pki_base and other classes need to access them.
2020-04-30 18:37:25 +02:00
Christian Hohnstaedt
ef9b3aff3d Drop superflous includes from header files 2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
a6ec3a9319 Minor fixes without functional changes 2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
3dd34a61bc Move "showPki()" from the model class to the view
The displaying function requires UI.
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
c5208f1cd7 Consolidate headers, unguard delete operator 2020-03-11 07:19:56 +01:00
Christian Hohnstaedt
113a201d39 Separate database from Mainwin for better cmdline support
New classes:
 - database_model: Manage the database tables (keys, req, cert, crl, templ)
   extracted from widgets/MW_database.cpp
 - arguments: parse commandline, dynamically create help text
2020-03-11 07:19:56 +01:00
Christian Hohnstaedt
b982245995 Close #163: Show key type/size on column of Certificates tab
Reuse HD_key_type, HD_key_size, HD_key_curve IDs from the key tab.
They use the "hd_key" type to put them into a context-submenu.

The certificate either uses the existing or a temporary key
and calls its "column_data()".

Simplify the submenu logic for the context-menu.
2020-02-12 22:42:36 +01:00
Christian Hohnstaedt
4300136235 Improve Shortcuts 2019-12-14 13:24:15 +01:00
Christian Hohnstaedt
dc2c2b723d Add Shortcut-key information in the context menu when deleting items 2019-12-06 15:09:04 +01:00
Christian Hohnstaedt
3a39e4d0b0 Close #101: Finish Rename with Enter shows Property Dialog
Only show properties on <ENTER> if not in editing mode.
2019-03-14 06:35:25 +01:00
Christian Hohnstaedt
c65d9e59ea Close #31: Closing certificate details window toggles tree folding
Disable default double-click action of the tree-view
2018-04-29 16:17:45 +02:00
Christian Hohnstaedt
a8c0d3eaa7 Update SGML documentation (WIP) 2018-03-22 20:39:26 +01:00
Christian Hohnstaedt
6e432238e7 Generalize, simplify and unify settings management
Add settings class to access the settings table in the database
Cache values and improve database writes.
Options dialog simplified
Replace getSetting / storeSetting
Unpack option flags to rows in the settings
2018-03-10 09:04:54 +01:00
Christian Hohnstaedt
6e0828bfe2 Surround multi-import and deletion by a transaction 2018-03-08 18:47:38 +01:00
Christian Hohnstaedt
a247e569d2 Handle keypress events in treeview 2018-03-05 07:46:11 +01:00
Christian Hohnstaedt
0745e18da2 Allow to edit item properties 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
4b3ee2c705 Switch database format to SQL(ite)
This is a large squash of many small commits.

Allow porting data from the legacy format to SQL.
Store Binaries base64 encoded and use db->transaction
Update password hash to be 8000 x SHA512 with 8 byte Salt
Add revocations table and fixup CRL generation
Add comment and insertion date columns

Fix column saving, remove trust, add XcaDialog
Allow changing the internal name and comment in Cert/Req details view
Extend Comment functionality, Replace About.ui by XcaDialog.ui
2018-03-05 07:42:36 +01:00
Christian Hohnstaedt
bdbaa0a946 Support Dragging certificates and other items as PEM text
Also dragging PEM test into XCA opens the import Dialog
2018-02-20 23:47:17 +01:00
Christian Hohnstaedt
de3f2d6db3 Improve speed of Bulk import.
Each imported item called columnsResize() and proxy->invalidate()
Bulk import of /etc/ssl/certs becamen very slow.

Deferring the call by 200ms helped a lot.
Import time changed from a couple of seconds to nothing.
2018-01-06 11:57:40 +01:00
Christian Hohnstaedt
6ac9389361 Make OID resolver Non-modal and let other widgets display details
- column items with context menus
 - double-click labels of the DN and X509v3 extensions
2015-10-01 13:39:11 +02:00
Christian Hohnstaedt
e5541c6d67 SF. Bug. #81 Make xca qt5 compatible
Extend XCA to also compile against Qt5
Remove directory from Qt includes
2015-09-17 18:42:42 +02:00
Christian Hohnstaedt
75a6d117f3 Refactor context menu
Better support multiple selections
 - Export all selected items into one PEM file
 - Batch Revoke/unrevoke/renew of many selected certificates
   of the same issuer
 - allow exporting templates as PEM

Add Feat. Reg. #83 Option to revoke old certificate when renewing

Always put all signed certificate to the newest CA.
If a CA certificate is renewed, all certificates issued by
the old CA are now shown as signed by the new one.
2015-05-17 09:17:04 +02:00