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.
After dropping Qt4 support, the Qt5 QStandardPaths class
can be used to replace my implementation of directory discovery.
QStandardPaths follows the XDG specification.
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.
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.
Always only use forward slash /
Drop all "QDir::separator()" and "nativeSeparator()"
functions. Only use it where filenames are displayed for the user.
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.
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
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....
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
- 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
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.
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
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
Add settings class to access the settings table in the database
Cache values and improve database writes.
Options dialog simplified
Replace getSetting / storeSetting
Unpack option flags to rows in the settings
Depending on the OpenSSL version some OIDs are known, some are not.
When reading "oids.txt" file and adding the new OID definitions:
- Silently skip definitions that are 100% identical to the OpenSSL values.
- Give a hint to change identifiers that are used for a different OID
- Give a hint about definitions that differ to remove them from the file.
Also accept them as Alias when reading dn.txt and eku.txt