Commit Graph

859 Commits

Author SHA1 Message Date
Christian Hohnstaedt
0dd587a3f2 Move OpenSSL configuration file generation
Instead of being a special context menu entry,
make it an option in the export dialog.
2024-03-04 12:21:00 +01:00
Christian Hohnstaedt
7e3b0e12fd Add pkcs11::closeSession() to fix token management
The Yubikey does not like an open read-only session
while changing items with a write-session
2024-02-29 17:57:46 +01:00
Christian Hohnstaedt
80f457a9f3 Export Dialog: Avoid appending the wrong extension
If the current file extension does not match the first entry
in the "filter" section of the file dialog, the first extension
is erroneosuly appended to the file name.

Moving "All Files ( * )" in front as first entry avoids this.
2024-02-25 01:07:32 +01:00
Christian Hohnstaedt
45253fae99 Close #516, #502: XCA remote database documentation
Create/copy from README.md documentation about remote databases.
Add Help button to Remote database dialog.

Extend documentation in the Windows msi installer
2024-02-25 01:05:24 +01: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
2688301393 Translation: translate help dialog on language change 2024-02-18 23:12:55 +01:00
Christian Hohnstaedt
9ab0b222bc Update contact information of japanese translator
as requested
2024-02-17 10:57:12 +01:00
Christian Hohnstaedt
56a1fdfc57 Fix translation of export format description
Before this change, the export format descriptions were created
statically before any translation has been setup.

Now it is created after the translation is setup and after every
language change.
2024-02-16 17:42:13 +01:00
Christian Hohnstaedt
92408696e2 Rename wrong header of key export
Spotted by: Jacek Tyborowski <jacek@tyborowski.pl>
2024-02-16 17:42:13 +01:00
Christian Hohnstaedt
687dab8781 Related to #519: improve validation icon
The validation icon (check-mark or exclamation mark)
were not displayed correctly when using "email:copy" or
"issuer:copy" in the alternative names.

Setup the temporary X509V3_CTX before evaluating the
validity of "Subject Alternative Name" and "Issuer Alternative Name"
2024-02-14 22:33:45 +01:00
Christian Hohnstaedt
f07d25a076 Update copyright years 2024-02-14 22:33:18 +01:00
Christian Hohnstaedt
d17131d297 Warn in case of weak PFX algorithm configured 2024-02-09 22:21:58 +01:00
Christian Hohnstaedt
0c1c00962f Fix whitespace errors 2023-12-30 11:01:11 +01:00
Christian Hohnstaedt
dbe9eaa891 Extend GUI test by PEM import 2023-11-03 13:06:54 +01:00
Christian Hohnstaedt
41e46c1f51 ASAN: drop more ressources on exit 2023-10-30 20:01:31 +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
e3791e2609 Add GUI test - testing the NewKey dialog 2023-10-24 17:03:09 +02:00
Christian Hohnstaedt
1599409b4f Remove duplicate Help-Button in CSR view
Fixup for 2333b02ddc
2023-10-19 19:02:26 +02:00
Christian Hohnstaedt
94a1eced62 Make XCA templates viewable for import
Until now XCA templates could not be viewed during import.
But this is necessary to skip the multi-import dialog.

The NewX509 dialog is used with almost everything disabled.
2023-10-08 22:19:18 +02:00
Christian Hohnstaedt
fc0191a512 Disable Public key import when displaying key of cert
Importing the displayed public key of a certificate during
certificate import resulted in a double free.

The "import" flag of the key-details can now forcefully
disable the import button.

Fixing it was way more complex than simply disabling it.

Also add sanity checks for pointers that are not our childs
when creating the QModelIndex
2023-10-08 22:19:18 +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
7f4794ff4a Improve import: Finish multi import when empty
Also only register ImportMulti and Detail dialogs
as child of its parent, if the parent is visible.
2023-10-07 20:51:07 +02:00
Christian Hohnstaedt
07d813317e Avoid database access without open database
When displaying external items before import,
XCA tries to find their issuer and matching key in the database.

Now it only does it if the database is open.
2023-10-06 11:49:07 +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
8f05c3eac9 Close #465 Export PEM + Key in one File
Fix logical error when exporting in PEM format.
The key export part was not reached...

The diff is much smaller when displayed with -b to skip
indentation-only changes....

Drop the unused "F_PLUSKEY" flag and fix the Template export
2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
be31b6e22e Make XCA AppStore compliant with -DAPPSTORE_COMPLIANT=ON
APPSTORE_COMPLIANT = ON:
 - Turns off the File menu and moves the language selector to
   the "Extra" Menu. "Options" and "Exit" are at the xca-macos
   special-menu anyway.
 - Switches the signing key from "Developer ID Application" to
   "3rd Party Mac Developer Application"
 - Sets the database name to "default.xdb"
 - Adds "-appstore-compliant" option to macdeployqt
 - Picks the "entitlement-appstore-compliant.plist"
 - Disables the "Token" menu and "PKCS#11 provider" tab
   in the option dialog
2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
856032b4a3 Silence warning message 2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
1159844cbe Show the real path of the running executable
in the About dialog
2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
8aaffcde91 Alphabetically sort the languages 2023-09-30 11:24:17 +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
c1bee8b38d Close #442: asan checks failed
Enable ASAN with -DADDRESS_SANITIZER=ON
Fix all findings inside XCA.
2023-09-20 21:08:44 +02:00
Christian Hohnstaedt
a324d1faeb Close #446: show more information in Recent Databases
Always print at most 30 characters of the database name.
Especially on macos the ToolTip Popup does not work.
2023-09-20 13:40:01 +02:00
Christian Hohnstaedt
2e36fd431a Macos: fix messagbox
Simple message boxes are still native messageboxes.
Complex message boxes have buttons with adapted texts.

Apparently the "Q_OBJECT" declaration in "xcaWarningBox"
made it. Don't know why.
2023-09-19 23:52:26 +02:00
Christian Hohnstaedt
65f2676939 Q_OS_MAC is deprecated 2023-09-19 23:39:03 +02:00
Christian Hohnstaedt
5cdd1e134c Improve database plugin detection
Drivers that fail with "Driver not loaded"
are skipped silently.
2023-09-15 21:45:08 +02:00
Christian Hohnstaedt
c34859797e Use existing font "Courier New" monospace font 2023-09-15 21:43:10 +02:00
Christian Hohnstaedt
5ed19e689e Optical improvement of main- and help-window 2023-09-15 09:38:29 +02:00
Christian Hohnstaedt
96ca26cc83 Integrate bulgarian translation
Thanks to Svetoslav Slavkov
2023-09-03 22:37:02 +02:00
Christian Hohnstaedt
061f676041 Improve/simplify item import
Unify import functions for some (on_butImport_clicked)
or all (on_butOk_clicked) items.
They both call "importIndexes(const QModelIndexList &indexes)"
containing some or all indexes to import.

db_x509.cpp: Only need to search the treeItem (containing all items
without issuer, not all in the rootItem (containing also certificates
with known issuer)

Re-use "remFromCont()" when stealing items from an other CA.
2023-05-30 14:38:55 +02:00
Christian Hohnstaedt
b126890bd7 Revert "Messagebox: Workaround for error not showing up"
This reverts commit eeedd6ec0e.
2023-05-25 23:23:15 +02:00
Christian Hohnstaedt
8662eff3ed Basic Constraints Pathlen: restrict input to postitive numbers 2023-05-25 22:19:14 +02:00
Christian Hohnstaedt
8f277ea781 x509v3_ext: Improve error-checking
Validate SAN, IAN, AIA, CRLDP during rollout.
Fix tab-switching when validating new certificate context.

Also work with X509_EXTENSION being nullptr
2023-05-25 22:18:48 +02:00
Christian Hohnstaedt
5f5ed2f22b Remote database names lost their numbers in recent Qt 2023-05-25 21:24:41 +02:00
Christian Hohnstaedt
780225198d macos CMake defaults for local arch, SDK and brew-Qt
The universal binary with older SDK and aqt-Qt will be
built by the release/build-mac.sh script
2023-05-25 21:23:48 +02:00
Christian Hohnstaedt
eeedd6ec0e Messagebox: Workaround for error not showing up
This was only observed on MacOS on M2 with QT 6.5.0.
Weird ..
2023-05-23 19:48:02 +02:00
Christian Hohnstaedt
d6d6d7d9d4 Update copyright years and adapt build scripts 2023-05-16 10:35:14 +02:00
Christian Hohnstaedt
fdf48c8b5b PR #425: Refresh supported hashes after key generation
There were 2 slots to trigger the switchHashAlgo()
whenever the selected key or request changes.

But their signature for automatic connect()ion was wrong.
After fixing the methods signature, they are connected
and get called whenever the keylist changes and especially,
when a new key is inserted.
2023-05-16 09:49:46 +02:00