Commit Graph

156 Commits

Author SHA1 Message Date
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
418b78ce52 Fixup for #548: fix detection of portable app
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
Don't call getHomeDir() in global constructor before main()
2024-09-08 12:17:39 +02:00
Christian Hohnstaedt
0212113424 Close #304 oids.txt not found etc if prefix non-standard
Add INSTALL_PREFIX to the header and add it to the search path
for OIDs, translations and documentation.
2024-08-25 00:47:49 +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
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
0391e6e27f Warning: 'kIOMasterPortDefault' is deprecated
... first deprecated in macOS 12.

Rename kIOMasterPortDefault -> kIOMainPortDefault
2023-10-15 21:15:28 +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
65f2676939 Q_OS_MAC is deprecated 2023-09-19 23:39:03 +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
fa0d67b26c Adaptions for QT 6.5 and macos
- Create universal binaries
 - re-create menubar to avoid duplications during language change
 - Select MACOS SDK 11 when using  QT-6.5 requiring it.
2023-05-14 21:41:47 +02:00
Christian Hohnstaedt
ced6dfc41a Add support for Qt6
XCA now supports both, Qt6 and Qt5 down to Qt-5.2

Use CMAKE_PREFIX_PATH to point to the QT dompiler directory like
$ cmake -B build -DCMAKE_PREFIX_PATH=$HOME/6.3.1/gcc_64
2022-08-31 00:09:37 +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 Hohnstaedt
ee842feb5e Improve windows compatibility 2022-08-31 00:01:06 +02:00
Christian Hohnstädt
e92031cf0d Drop debugging output 2021-11-20 02:12:02 +01:00
Christian Hohnstädt
44bf1b4e84 Fix detecting the language directory 2021-11-18 22:42:41 +01:00
Christian Hohnstaedt
25d2fdabb2 Fix and improve building help and documentation
- Always build html documentation if sphinx-build is available.
  to be installable during install
- Collect "${D}/qthelp/xca.qhc" "${D}/qthelp/xca.qch" in QTHELP_IDX
  and use this instead.
- On linux also install the qthelp in an html subdirectory like WIN32
- Don't instanciate QHelpEngine if no help available.
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 Hohnstädt
8271a1a3e8 MacOS: Fix location of translations 2021-10-24 17:57:23 +02:00
Christian Hohnstaedt
f5f6b57df4 Fix translation handling.
Use "i18n" instead of "translations" as subdirectory.
Expect "i18n" being a directory.
2021-06-01 17:48:37 +02:00
Christian Hohnstaedt
487f5e2046 Cleanup: Drop many superflous includes and unused loadImg() function 2021-06-01 17:48:37 +02:00
Christian Hohnstaedt
f8915fbc98 PwDialog: Split into cmdline-core and GUI
Another step to split core and GUI components
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
68273d0a30 Switch from autotools/qmake to cmake
Why?
 - QT will switch from qmake to cmake sooner or later.
 - autotools are good for unix-ish systems, cmake also for
   macOS and Xcode as well as Windows and VS-code
 - Cross compiling the windows-binaries on linux
   is not very helpful to attract windows-centric
   developers.

Also drop qmake's xca.pro
Generate man-page and sphinx sources of commandline arguments
during build by executing xca (xcadoc.cpp).
Generating Version-patchlevel and git hash is now also
OS independent.
2021-06-01 17:48:37 +02:00
Christian Hohnstaedt
ccfad6a1c3 Replace qWarning()s by qDebug() 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 Hohnstaedt
523fa64486 asn1ToQString: use OpenSSL's ASN1_STRING_to_UTF8()
instead of my own implementation.

Please don't ask why I didn't look for such a function
before. I don't know.
2021-05-10 20:41:12 +02:00
Christian Hohnstaedt
57802580c8 Drop backward-compatibility for old(<2.0.0) XCA databases 2021-05-10 20:41:12 +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
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
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
b5c9d645e3 More native separators when displaying file names 2020-05-06 17:57:09 +02:00
Christian Hohnstaedt
8f46d238e0 Replace __ME makro by pki_base QString() operator
Now a pki item can transform itself to a QString for debugging
2020-04-30 18:37:48 +02:00
Christian Hohnstaedt
7d5bb9ca4f Fix newline handling 2020-04-07 15:54:16 +02:00
Christian Hohnstaedt
5cb1b45d81 console_write: takes a QByteArray instead of printf()
Good Windows Unicode font:
https://math.berkeley.edu/~serganov/ilyaz.org/software/fonts/
2020-04-06 22:08:04 +02:00
Christian Hohnstaedt
4d95912d51 Add console_write() to print also on CMD 2020-04-05 22:45:11 +02:00
Christian Hohnstaedt
b7d3e6a3cc Merge branch 'master' into develop 2020-04-05 13:49:01 +02:00
Christian Hohnstaedt
fb5ee14911 Improve PKCS11 library loading for portable app 2020-04-05 13:12:09 +02:00
Christian Hohnstaedt
c528c37986 Merge branch 'master' into develop 2020-04-05 10:58:47 +02:00
Christian Hohnstaedt
500f11c9b3 Get rid of filename2bytearray and QString2filename
We now use QFile or its derivate XFile, who smoothly
handle unicode filenames also on windows.

The lt_dlopen() only handles "char *" not wchar_t.
Try to convert the filename with all known codecs
until we can open it.

filename2QString() remains to differently encode
filenames provided on the commandline on Windows.
2020-04-05 09:16:12 +02:00
Christian Hohnstaedt
5543ec2fb8 Merge branch 'master' into develop 2020-04-02 07:35:18 +02:00
Christian Hohnstaedt
b41d322069 Refactor native separators / and \ on windows.
Always only use forward slash /
Drop all "QDir::separator()" and "nativeSeparator()"
functions. Only use it where filenames are displayed for the user.
2020-04-02 06:12:47 +02:00
Christian Hohnstaedt
799d3262b0 Reactivate translation of x509 expressions 2020-03-29 22:33:57 +02:00
Christian Hohnstaedt
a48ea10e3d Split key generation and data-collection-UI
Use the key job to transfer the information
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
c3abd640fc Fix certificate assignment importing a CA certificate
Fix finding our unassigned certificates when importing a CA
(issuerSqlId may be QVariant(int, 0) depending on the database)

Reassign certs from an older CA to the imported one.
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
089c7d39ef Improve console password input 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
176e26e390 Close #170 xca-portable-2.2.1 cannot change language
Use GetModuleFileNameW() and RegGetValueW()
returning the path as UTF-16 encoded unicode.

entropy: Use QFile inherited class for file access

This allows wchar_t encoded file names and paths
on windows.

So glad not having to deal with wchar_t / UTF-16 otherwise,
but using QString and UFT-8. The destiny of early adopters....
2020-03-11 05:49:18 +01:00
Christian Hohnstaedt
dcf8c7bcdb No need for KEY_WOW64_32KEY registry flag
Registry entries are also 64bit.
2020-01-22 05:56:11 +01:00
Christian Hohnstaedt
4e16158668 Add missing DLL for PosgreSQL DLL 2020-01-21 21:34:31 +01:00
Christian Hohnstaedt
a12b2e94f5 Close #129 Unattended Installation. Switch to MSI installer
Improve Windows installation xca.wxs

Move documentation to "html" dir and translations to "i18n"
in the portable-app and the MSI installation
Modyfies getDocDir() and Introduces getI18nDir()

Drop Nullsoft installer files
2020-01-20 22:33:05 +01:00