Commit Graph

899 Commits

Author SHA1 Message Date
Christian Hohnstaedt
02cd168d82 Move dbhistory, defaultdb and defaultlang into settings.ini 2025-03-30 21:44:33 +02:00
Christian Hohnstaedt
7428170b2d Close #635: Inconsistent font size.
Don't use monospaced font for the table by default.
Allow setting a different, especially a monospaced font
for the table and remember it globally.
2025-03-30 11:24:39 +02:00
Christian Hohnstaedt
89b7c6beea codespell: Fix spelling issues, no functional changes 2025-03-28 18:11:18 +01:00
Christian Hohnstaedt
51de716caf Close #643: secp521r1 ssh fingerprints incorrect
SSH only uses and supports curve "prime256v1".

Only display SSH fingerprints for supported keys.
2025-03-28 11:51:51 +01:00
Christian Hohnstaedt
70d217b354 Close #641: Keep serial number & revoke old certificate
should not be used at the same time. Actually "Keep serial number"
should generally be used with care.

When checking "Keep serial number", "Revoke old certificate" is disabled
and unchecked and "Replace old certificate" is disabled and checked.
2025-03-28 11:51:51 +01:00
Christian Hohnstaedt
53cbeea783 Close #152: How can we specify the Cryptographic Service Provider
Some checks failed
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 5.15.2, ubuntu-latest) (push) Has been cancelled
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 6.6.2, ubuntu-latest) (push) Has been cancelled
CMake / build (build/xca-*.dmg, Unix Makefiles, mac, /opt/homebrew/opt/openssl, macos, 6.6.2, macos-latest) (push) Has been cancelled
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) Has been cancelled
A comment line of the format "CSP: <Provider Name>"
in the private key will be used as CSP during PKCS#12 / PFX
export.
2024-09-30 19:07:12 +02:00
Christian Hohnstaedt
1fe2c9907b Remove linebreaks for better visibility
80 Columns width is so '90s
2024-09-30 18:45:08 +02:00
Christian Hohnstaedt
4b76522d9e Close #199: Templates and Key Identifiers
Extend all 3 templates.
Skip AKID for self-signed certificates.

Visualize this by disabling the AKID checkbox
if a self-signed certificate is going to be created.
2024-09-29 18:39:00 +02:00
Christian Hohnstaedt
2bb89cb8c0 Disable Import button when creating a new template
It does not belong there and caused a crash when pressing import and
then OK.
2024-09-29 18:39:00 +02:00
Christian Hohnstaedt
5f4308245c Close #239: Check existing Name Constraints
This check is performed before the certificate is
issued and signed. Like all the other checks
regarding validity, extensions and other things.

Issuing certificates that violate the Name Constraints
of any CA in the chain is still be possible.

But there will be a warning now with the name of the affected
CA-Certificate and the violated constraint.

The Issuer can then decide whether to issue the
certificate or not.
2024-09-29 18:39:00 +02:00
Christian Hohnstaedt
7d3ff4f0f9 Add OpenSSL PURPOSE and validation results
A new tab on the certificate details dialog
shows the result of the OpenSSL validation process
and the calculated OpenSSL Purpose.

The translation of the OpenSSL X509_V_ERR.... messsages
back to strings is done by grepping them from "openssl/x509_vfy.h"
and wrapping them into a macro-call.
Additionally guard them by an #ifdef (Zombieland rule #2: Double-Tap)
This way:
 - I don't need to test and check in which versions of OpenSSL
   which errors are available or not
 - New errors will be picked up automatically, as long as they
   match the "X509_V_ERR_" pattern
2024-09-29 14:12:17 +02:00
Christian Hohnstaedt
fa10ca43b5 Close #587: Incomplete refactoring of adapt_explicit_subj
Fix the "adapt_explicit_subject" in NewX509.cpp
to mathc the other occcurancxes in Options.cpp
2024-09-28 15:57:05 +02:00
Christian Hohnstaedt
8390e9588f Allow live changes during import of a template
With this change it is not necessary to open an imported
template if an imported tamplate cshall be changed.
2024-09-28 15:57:05 +02:00
Christian Hohnstaedt
2b3f4dd039 Combine #90 and #315 and support UPN in name constraints 2024-09-15 09:25:44 +02:00
Christian Hohnstaedt
cb1f02502d Close #90, #361: Name Constraints (RFC5280 section 4.2.1.10)
Some checks failed
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 5.15.2, ubuntu-latest) (push) Has been cancelled
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 6.6.2, ubuntu-latest) (push) Has been cancelled
CMake / build (build/xca-*.dmg, Unix Makefiles, mac, /opt/homebrew/opt/openssl, macos, 6.6.2, macos-latest) (push) Has been cancelled
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) Has been cancelled
Conversion of name constraints from certificate to Template
(Advanced Tab) and using them from there was working since long.

Now there is an additional input line, like (and next to)
SubjectAlternativeName with live validation and edit button
with guided input.

The conversion from cert to template now puts the extension
into the correct LineEdit and not on the Advanced Tab anymore.

However, XCA does NOT follow the constraints, yet.
It is still possible to issue certificates with arbitrary
names, independent of any "Name Constraints" in the CA.

This is what issue #239 asks for.
2024-09-14 23:53:59 +02:00
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
7376cce5a7 Improve export file / dir validation
- Still ask before overwriting files.
 - Error out if file name exists, but is not a file.
 - Ask to create non-existing directories
 - Check if an expected directory either really
   is a directory or does not exist.
2024-09-14 01:13:18 +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
307fbae89c Close #359: Symlink to PKCS#11 lib resolved
Some checks failed
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 5.15.2, ubuntu-latest) (push) Has been cancelled
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 6.6.2, ubuntu-latest) (push) Has been cancelled
CMake / build (build/xca-*.dmg, Unix Makefiles, mac, /opt/homebrew/opt/openssl, macos, 6.6.2, macos-latest) (push) Has been cancelled
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) Has been cancelled
Do not resolve symlinks of PKCS#11 library paths.

However the native file dialogs for example on MAC OS
do always resolve symbolic links.

In this case xca may be started with the --no-native-dialogs
commandline option when specifying new libraries.
2024-09-09 18:47:29 +02:00
Christian Hohnstaedt
60ca584266 Close #315 Support UPN type for EAP/802.1X certificates
Replace "UPN:" by "otherName:msUPN;UTF8:" when generating
the extension from the Subject- and IssuerAlternativeName.

Extend the Edit dialog of the SAN and IAN by the "UPN" prefix.

Replace "otherName:msUPN;UTF8:" by "UPN:" when creating a template
from an existing certificate or request.

The OpenSSL config file export, the configuration display
and edit on the "Advanced Tab" are not afffected, since
this is an XCA syntax sugar, not supported by OpenSSL.

Update documentation
2024-09-06 10:07:51 +02:00
Christian Hohnstaedt
e3a2789f08 Add infrastructure for korean translation
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
2024-09-05 18:06:08 +02:00
Christian Hohnstaedt
7f5bdb7dec Close #287: template don't save/restore correctly
Use the probably modified internal name of the template
in the template-details dialog before import.

Therefore the name of the qlineedit of the internal name of
all other details dialogs changed from "descr" to "description"
to match the name in the NewX509 dialog and to be found
by the "XcaDetails" class.

When exporting the template data, add the internal name and the comment
to the exported data.
The XCA template data is defined by us and can be modified.
This change is backwards and upwards compatible:
  New versions of XCA can read an old Template export and vice-versa.
2024-08-31 14:48:43 +02:00
Christian Hohnstaedt
6bf6f4384b Automatically generate documentation of export formats
The pki_export class has all information to generate the documentation
2024-08-30 09:30:42 +02:00
Christian Hohnstaedt
b03076c474 Close #391: hide expired and revoked certificates 2024-08-29 09:10:58 +02:00
Christian Hohnstaedt
862e2b48d8 Close #311: 2nd Fixup for a548227a07: install QT translation files again
The QT provided QM files in QM_FILES got overwritten by the
invokation of the translation function.
Put them into a different variable.

And their name is qtbase_XX.qm, not qt_XX.qm

This fix also translates the "Finder Menu"
2024-08-25 00:49:13 +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
bb32e30f9c Switch application direction depending on the language
When switching to persian language, XCA
switches to Right-To-Left layout.
2024-04-23 22:07:24 +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
e1914d3fd3 Improve translation file lookup on linux
Also look in the directory of the application
if no other translation was found.
Add search path for qt5 or qt6 library translations
depending on the compiletime library version

Use static initializers while at it.
2024-04-23 21:49:39 +02:00
Christian Hohnstaedt
e3c2c40f1e Support importing existing OpenVPN TLS Auth keys
The TA-Key is the property of a CA.
2024-04-22 19:13:02 +02:00
Christian Hohnstaedt
68b14617cc Add tests for the DateTime input for validity times.
Test the correct behavior of the "Midnight" and setDiff methods.
Especially to keep the time when switching from hidden time (midnoght)
back to shown time.
2024-04-22 19:13:02 +02:00
Christian Hohnstaedt
a53e0a96aa ExportDialog add missing file extensions
At least the macos file dialog behaves strange if
the currently selected extension is not listed in the glob-list.
2024-04-22 19:13:02 +02:00
Christian Hohnstaedt
a9c5466ea9 Make more texts translateable 2024-04-22 19:13:02 +02:00
Christian Hohnstaedt
6a71ea218f Fix "Copy extensions from request" function
Previously the request extensions were ignored
when they also existed on one of the other tabs.

Now they are correctly listed and marked as duplicated.
2024-04-22 19:13:02 +02:00
Christian Hohnstaedt
53dfdb35e6 NewX509: use enum instead of int for clarity
No need to call "NewX509::validateExtensions" with the "nconf"
2024-04-22 19:13:02 +02:00
Christian Hohnstaedt
e72ffb1445 Extend #383: tag insecure PFX/PKCS#12 algorithms
Show the insecure algorithms with the postfix (insecure)
in the dropdown menu.

Since the "insecure" is translateable, put the algorithm NID
into the data field of the combo-box entry to
reliably find the correct entry by NID instead of text.
2024-03-10 18:53:52 +01:00
Christian Hohnstaedt
b395eaa5cc Close #536: macos include OpenSSL legacy provider
Put it into the "PlugIns" directory and load it from there.
Show whether the legacy-provider was loaded in the About-Dialog.

CmakeLists.txt: Improve OpenSSL Major version detection
and replace the foreach() loop in misc/CMakeLists.txt
by the simpler list(TRANSFORM ...)
2024-03-10 18:53:52 +01:00
Christian Hohnstaedt
3457454e88 Close #531: XCA cannot properly access a YubiHSM2
(login issues maybe)

Extend token management dialog.
If no key and certificate were found, offer to retry with PIN.
2024-03-07 22:20:20 +01:00
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