Commit Graph

146 Commits

Author SHA1 Message Date
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
Christian Hohnstaedt
a05349e917 Portable App: xca.exe path differs from registry install path
Even better select the initial working directory
2020-01-19 08:48:02 +01:00
Christian Hohnstaedt
580a2fae2b Close #93 Default output folder / Improve Portable App usability
- allow setting a database as default
- Strip xca-app-folder from database and export filenames.
  This allows renaming/moving the portable app and open the default DB
  and use the working directory inside the folder
- Remember database history and configured language
2020-01-13 07:26:46 +01:00
Christian Hohnstaedt
23a737bbfa Constify getLibExtensions() 2020-01-13 07:26:46 +01:00
Christian Hohnstaedt
8f3335be0f Improve lib detection 2019-03-21 05:25:21 +01:00
Christian Hohnstaedt
1bc340a0ef Close #104: Also show sha256 digests of public keys
Print digest of public keys in the key details in different formats:

Print SHA256 SSH digest as used to by SSH users:
	ssh-keygen -l -f ~/.ssh/id_rsa.pub

Print SHA1 X509 key digest as shown in the
	Subject key identifier of a certificate

Print SHA256 digest as in:
	openssl pkey -pubout -outform DER < key.pem | sha256sum
as requested by this issue.

Refactored digesting functionality by a generic Digest()
function working with QByteArrays.
The function formatHash() now also expects a QByteArray input.
2019-03-14 06:35:24 +01:00
Christian Hohnstaedt
00fbb85c70 Improve on portable App and registry access 2018-11-07 18:30:14 +01:00
Christian Hohnstaedt
91faa1b675 Improve portable App 2018-11-05 06:21:14 +01:00
Christian Hohnstaedt
eba8be37b8 Make PKCS11 libs, working dir and main-window size host-dependent
A "hostId" determines the current host and is appended to
the "workingdir", "pkcs11path" and "mw_geometry" settings
in the database. This allows opening the database
on different hosts without wrong workingdir or not
loadable PKCS#11 libraries
2018-10-29 22:24:22 +01:00
Christian Hohnstaedt
00bd36f19b Support for XCA as portable App
On Windows XCA goes in portable mode if no XCA registry entry is found.
On Mac and Unix it checks the XCA_PORTABLE environment to be non-empty.
In portable mode:
 - The current working directory is not written to the database
 - The configured language and history of opened databases is
   forgotten after a restart of XCA
 - No registry entry is required nor written.
 - No unexpected files are written to disk, except exported items.
 - Portable mode is displayed in the "About" dialog

If setup.exe or "make install" are not used,
 - XCA is not assigned as app for any file types
2018-10-25 16:43:19 +02:00
Christian Hohnstaedt
6f8ca8dd65 Improve DN translation notation 2018-10-25 16:43:19 +02:00