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
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.
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.
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
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
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
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
Caching solution for 186657fbce
was bad. It always returned "visible" when called with unchanged
pattern instead of the last result. Cache the last result
in "iamvisible": 0=no, 1=yes, 2=one-of-my-children and return
the cached value as long as the search pattern is unchanged.
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.
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.
Extend B64_BLOB from "VARCHAR(8000)" which was a good
common value - until I realized that CRL may become pretty large.
Use "TEXT" for all databases but MariaDB, where LONGTEXT is used.
Add database type check via SQL query to detect the
correct database even behind an ODBC Driver.
A non-empty parent pointer now indicates that this
item is already inserted in the tree-view.
Duplicated templates are not. Do not copy the parent link
in the constructor.
According to the documentation EVP_PKEY_check() may
return -2 if the algorithm is not supported.
This has been observed with OpenSSL-1.1.1
See also b96951fdfd
If the base64 decoding fails these function return a null pointer
without setting an openssl error.
Additionally throw an error if the PEM_read_bio functions return NULL.
Do not interact with the GUI when loading datbase items (beginInsertRows,
beginMoveRows, beginRemoveRows, etc.) by not using
insertChild() / remFromCont() anymore.
Fill and organize the root- tree- and sub-items and call
columnsContentChanged() once when done.
Automatically set "parent" of a pki-item when inserting or removing
as child items.
Unify import functions for some (on_butImport_clicked)
or all (on_butOk_clicked) items.
They both call "importIndexes(const QModelIndexList &indexes)"
containing some or all indexes to import.
db_x509.cpp: Only need to search the treeItem (containing all items
without issuer, not all in the rootItem (containing also certificates
with known issuer)
Re-use "remFromCont()" when stealing items from an other CA.
This fix differs from the proposal in #368 because the signature
of pki_crl::sign() changed after the 2.4.0 release.
However, I was able to increase the bug impact!
Now it crashed instead of only throwing an error! :-)
The signature of the pki_crl::sign() method changed with
commit 61fa66b129, but C++
"outsmarted" me and automatically transformed the EVP_MD == nullptr
into the digest::constructor(EVP_MD) which crashed on the nullptr.