Commit Graph

139 Commits

Author SHA1 Message Date
Christian
a20e810405 Update Windows build to install legacy.dll
Enable legacy provider to allow loading keys
encrypted with an ancient, insecure
algorithm like "pbeWithSHA1And40BitRC2-CBC" for PKCS#12/PFX

Install the dynamic.dll in the portable app and WIX installer.
2024-02-14 22:27:17 +01:00
Christian Hohnstaedt
8bd6141f0c Set OpenSSL default UI to not fallback to commandline 2023-11-02 14:05:44 +01:00
Christian Hohnstaedt
41e46c1f51 ASAN: drop more ressources on exit 2023-10-30 20:01:31 +01:00
Christian Hohnstaedt
e3791e2609 Add GUI test - testing the NewKey dialog 2023-10-24 17:03:09 +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
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
4a0f90e1b8 Drop unneeded allitems pki collector 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
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
e39be9b4e9 Close #423: parameter --name is not respected when running with CLI
Evaluate --name argument when generating the CRL.
Add --import-names option. This allows to name the imported items
individually, even if one PEM file contains multiple items.
2023-09-24 00:34:46 +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
e8cd69c45d Drop references to iostream
github actions seem to fail because of iostream.

Do not analyze the details for hours, but drop the
last iostream references and hope it helps.

iostream was not the culprit. Keep this change anyway,
since it makes sense and unifies stdout access.
2023-09-23 12:27:00 +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
1176a35fa7 Debugging: allow to select/deselect debug messages
Inspired by the Linux kernels dynamic debugging.
2023-05-28 15:31:33 +02:00
Christian Hohnstaedt
d8da9dd786 Really exit the application, when clicking exit
The password-input dialog of the database has an exit button.
It now really exits the application.
2023-05-19 22:54:20 +02:00
Christian Hohnstaedt
ee842feb5e Improve windows compatibility 2022-08-31 00:01:06 +02:00
Christian Hohnstaedt
0a54a0ad04 Fixup for #67: Password input dialog
Also ask for password when called with database on commandline
Ask for password repetition if a new password is typed
2022-08-31 00:01:06 +02: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
c752508979 Separate XCA Warning in Cmdline and GUI 2021-09-09 21:46:30 +02:00
Christian Hohnstaedt
915a920de8 cmake: Split CMakeLists.txt into the different sub directories
mv cmake/sphinx-documentation.cmake -> doc/CMakeLists.txt
2021-06-01 17:48:37 +02:00
Christian Hohnstaedt
9c49c9949f Consolidate and document used environment variables
Rename XCA_SPECIAL to XCA_ARGUMENTS, which is less generic.

and change %1_OPTIONS to XCA_%1_OPTIONS to prefix all
XCA related environment variables with "XCA_".
2021-06-01 17:48:37 +02:00
Christian Hohnstaedt
0c5603ec20 XcaWarning: Split into Core and GUI element
one more step to split core and GUI components
2021-06-01 17:48:37 +02:00
Christian Hohnstädt
d8283d8ab5 Read oids: Avoid out of range access when reading OIDs
..and catch openssl_error()s when reading the OIDs
2021-06-01 17:48:37 +02:00
Christian Hohnstaedt
7f431ccbd6 Fix typo introduced with 5f1d3945 to query the database password
Opening a database now again asks for the password
2021-06-01 17:29:30 +02:00
Christian Hohnstaedt
2635b91033 WIP 2021-05-25 21:10:54 +02:00
Christian Hohnstaedt
03769bef56 Add commandline option "select" to 'print', 'pem' or 'text'
can be used to export or display items.
2021-05-24 22:22:51 +02:00
Christian Hohnstädt
00e592d8f3 Sort output of "--issuers" and "--list-items" by primary key
This is also somehow a sort by inserting date.
For more detailled displays a sqlite browser should be used.
2021-05-11 12:07:40 +02:00
Christian Hohnstaedt
ccfad6a1c3 Replace qWarning()s by qDebug() 2021-05-11 12:07:40 +02:00
Christian Hohnstaedt
7e72d8c02c Commandline: Add "--list-items" to print a list of database items 2021-05-11 12:07:40 +02:00
Christian Hohnstaedt
5f1d394530 Close #67: possibility to ignore password prompt from CLI
XCA automatically checks whether the current arguments need
a password
2021-05-11 12:07:40 +02:00
Christian Hohnstädt
8daf06dcac Close #259: Follow the XDG base directory specification
After dropping Qt4 support, the Qt5 QStandardPaths class
can be used to replace my implementation of directory discovery.

QStandardPaths follows the XDG specification.
2021-05-11 12:04:46 +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 Hohnstaedt
c2d88bf460 Database.close() is idempotent. Call it at the end unconditionally 2021-05-07 13:04:32 +02:00
Christian Hohnstaedt
5d4b52ac87 Fix opening a database on startup.
Commit e32fce8581
(main.cpp: mainwin must exist for read_cmdline() in GUI mode)
created the Mainwindow before parsing the commandline,
but the MainWindow constructor opened a default database if set.

With this change, the MinWindow constructor does not open a default
database. Now the default database is explicitly opened after parsing
the command line, if no other database is already open.

Rename init_database() to setup_open_database()
It is re-entrant.
2021-04-28 22:26:40 +02:00
Christian Hohnstaedt
e32fce8581 main.cpp: mainwin must exist for read_cmdline() in GUI mode
If XCA runs in GUI-mode, the mainwin must be accessible.
2021-04-23 15:57:32 +02:00
Christian Hohnstädt
ca0fdcd5c9 Bash completion 2021-04-23 15:57:32 +02:00
Christian Hohnstaedt
d53d64d23d Transform XCA documentation from SGML to sphinx
linuxdoc is pretty outdated, while sphinx is really cool:

 - Sphinx is modern with a broad user base
 - The generated documentation is themeable
 - The sphinx-source is much more readable than the
   SGML-tag scattered linuxdoc.
 - The different topics can be splitted into different files
 - It can be converted to qt-context sensitive help
 - It supports syntax highlighting for the SQL database documentation
 - It is supported on MacOSX,because it is python-based.

Drop code2html perl-script, which was used to colorize the SQL schema.
Generate "doc/arguments.rst" with XCA_MAN="rst" ./xca
2021-04-09 17:36:03 +02:00
Christian Hohnstaedt
e9edb75442 ImportMulti: Update pointer management to always free all items 2020-10-16 00:37:12 +02:00
Christian Hohnstädt
497e4a6120 Extend Password input by filedescriptor number and automatic man page
Also extend the documentation about the password.
Automatically generate the man page from the options.

Call xca as "XCA_MAN=1 ./xca" to print the current man-page options
2020-10-14 19:48:18 +02:00
Christian Hohnstädt
8963590053 Create user-settings directory after creating QApplication
At least on OSX this is required to have
QCoreApplication::applicationName() return "xca"
2020-10-14 19:48:18 +02:00
Christian Hohnstädt
78d6b5e67c Check XCA_ABORT_ON_WARNING envvar to abort() on any warning or worse
This allows easy debugging of warnings and errors
2020-10-14 19:48:17 +02:00
Christian Hohnstädt
24009b13c7 Fix warnings 2020-10-14 19:48:17 +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
93a7c6a9a3 Implement option --list-curves and display EC curves 2020-05-06 18:32:37 +02:00
Christian Hohnstaedt
9b201566e2 Improve on cmdline, console, unicode and windows CMD
Improve Windows registry functions

Use *A postfix function explicit becaus e we don't expect
unicode characters.
Also simplify "console_write()"
2020-05-06 18:32:27 +02:00
Christian Hohnstaedt
d1c0970ea1 BioByteArray: Add size() method 2020-05-06 18:08:36 +02:00
Christian Hohnstaedt
b5c9d645e3 More native separators when displaying file names 2020-05-06 17:57:09 +02:00