Commit Graph

2421 Commits

Author SHA1 Message Date
Christian Hohnstaedt
c4d477c0c9 Close #480: add flatpak build information and github action
Reused work of @SharkyRawr for issue #123 - Thanks.
2023-10-23 17:26:43 +02:00
Christian Hohnstaedt
f28ab5c3bd Extract cmdline handling from main.cpp 2023-10-16 22:42:36 +02:00
Christian Hohnstaedt
cbaa8eba16 Extract debug_info class from main.cpp 2023-10-16 22:42:36 +02:00
Christian Hohnstaedt
cd1c14893e Revert "Warning: 'kIOMasterPortDefault' is deprecated"
But since we still support macos 10.15 we stick with it.
This reverts commit d0aee7e713c91ad4f0cb1824a4b7bfe09b5325c3.
2023-10-15 21:15:28 +02:00
Christian Hohnstaedt
432293ad23 x509name: add module test and fix memory issues
Runing module tests with ASAN makes it easier to tackle mamory issues.
2023-10-15 21:15:28 +02:00
Christian Hohnstaedt
0391e6e27f Warning: 'kIOMasterPortDefault' is deprecated
... first deprecated in macOS 12.

Rename kIOMasterPortDefault -> kIOMainPortDefault
2023-10-15 21:15:28 +02:00
Christian Hohnstaedt
d56d47e7bb Related #405: manage X509_NAME in QSharedPointer 2023-10-15 21:15:28 +02:00
Christian Hohnstaedt
2dd2477d62 Add tests for entropy and asn1time
Make a1time::get*() const, because functions return a pointer
still owned by a1time.
Switch from deprecated setTimeSpec() to setTimeZone(()
2023-10-15 21:15:28 +02:00
Christian Hohnstaedt
7db5b7049e Close #405: member functions of a1int class have memory leaks.
Manage ASN1_INTEGER pointer by QSharedPointer
Add AddressSanitizer config to the tests.
2023-10-13 23:38:23 +02:00
Christian Hohnstaedt
d36b32feac Close #402: Subject Alternative Name not filled by all CN
Iterate over all CN and add them to the SAN.
2023-10-13 00:57:13 +02:00
Christian Hohnstaedt
6cfd017447 Execute module tests in github actions 2023-10-13 00:57:13 +02:00
Christian Hohnstaedt
e2e142e012 Add some moduletests 2023-10-12 23:58:00 +02:00
Christian Hohnstaedt
80416fb0b0 Split basic functions
Extract all functions that only depend on Openssl and QtCore
2023-10-12 23:58:00 +02:00
Christian Hohnstaedt
7b02ae415b Drop ancient approach for testing 2023-10-12 23:58:00 +02:00
Christian Hohnstaedt
23a044f5ea Support different OSX SDK versions as LSMinimumSystemVersion
Also reduce the minimum SDK to 10.15 for the official build.
2023-10-10 21:03:40 +02:00
Christian Hohnstaedt
84b4c3b73a Macos: Transporter says it wants LSHandlerRank 2023-10-09 23:03:12 +02:00
Christian Hohnstaedt
f7ccee2504 aqt somehow suddenly fails to download Qt 6.6.0 2023-10-09 22:36:48 +02:00
Christian Hohnstaedt
405bc0cabf Catch invalid-key description error
This results in reasonable error message and behavior
2023-10-09 22:31:29 +02:00
Christian Hohnstaedt
570a6c1013 Add build script for MSYS2
This script also builds openssl with legacy algorithms enabled.
2023-10-08 22:26:39 +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
3e62f11230 Add File extensions in Info.plist supported by XCA
Inspired by the "/System/Applications/Utilities/Keychain Access.app"
Info.plist: cert, cer, der, crt, p7c, pem, p7b, p7r,
p10, csr, p12, pkcs12, pfx
2023-10-07 20:36:09 +02:00
Christian Hohnstaedt
4bfa81d4be More #442: Fix more leaks 2023-10-06 11:56:29 +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
a39c94481e main.cpp:cmd_help(): don't use exit(), but return
The exit() call resulted in a segfault when a database was open.
Folowing the "shutdown structure" by exiting at the end of
main circumvents it.
2023-10-05 23:12:40 +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
ec9dd9ac18 Apple disable codesigning if no certificate exists 2023-10-01 23:23:57 +02:00
Christian Hohnstaedt
6dd1ceb7f3 Rename calculated VERSION.txt in BINARY_DIR
Otherwise if BINDIR == SRCDIR this would overwrite
the original VERSION.txt.
2023-10-01 20:47:26 +02:00
Christian Hohnstaedt
de3de97454 Extend Release Notes 2023-09-30 20:51:25 +02:00
Christian Hohnstaedt
4a0f90e1b8 Drop unneeded allitems pki collector 2023-09-30 11:24:18 +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
387c238d73 Close #459: pass private key password
The password provided on the command line will be used
as automatic input of the first password dialog.

The database will be opened without requiring a password.
This results in the following bevavior:
  - crl-gen works with:
    o database password
    o private password
    o PIN
  - keygen works with database password
2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
ed074537f7 Translations: Fix warning in xca.ts and add languages to Info.plist 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
9b749d799b Close #460: Impossible to import PKCS#12 (RC40_CBC)
Unconditionally load the "legacy" provider to be able to
import legacy files like "pbeWithSHA1And40BitRC2-CBC"
encrypted PKCS#12
2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
954eec958a Improve hash selection, especially for ED25519 keys
When using a key with a hash algorithm, check whether
they can be used together. This should have been happened in the GUI.

In case of an error use the largest algorithm
2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
3c059b1de1 Add HTML headers around the generated changelog.html 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
270152e708 Add db transaction around the removal of a CA certificate
.. to avoid an error message, enforcing each database write access
into a transaction
2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
751d4260ea Fix documentation typos 2023-09-30 11:24:18 +02:00
Christian Hohnstaedt
8aaffcde91 Alphabetically sort the languages 2023-09-30 11:24:17 +02:00
Guido Pennings
1af364b858
Dutch Translation for XCA 2.5.0
xca_nl.ts
2023-09-30 09:37:23 +02:00
Christian Hohnstaedt
472d9e722c Generate changelog.html from changelog 2023-09-24 23:07:35 +02:00
Christian Hohnstaedt
cc9245b14c Fix release scripts after release ... 2023-09-24 22:11:04 +02:00
Christian Hohnstaedt
d8e4f2b435 Release XCA 2.5.0 done 2023-09-24 21:27:46 +02:00