Commit Graph

1161 Commits

Author SHA1 Message Date
Yaroslav Isakov
46c0f7ed25 Fix OpenSSL 3.0 engine asking two times for sign
In commit 9767a3dca7
OpenSSL changed sign behavior, that now it calls sign mechanism two
times - first with NULL output buffer, to get size of it, for next call.
This causes two sign operations in token for ED25519, so, let's detect
NULL buffer and return size of signature.

I haven't tested other type of keys - it's possible that they have
the same issue.
2023-05-16 09:49:46 +02:00
Christian Hohnstaedt
02fc95c70b Reset parent pointer when removing child from container
and use the issuer as parent when inserting it to
put it under the correct issuer
2023-05-16 09:49:46 +02:00
Christian Hohnstaedt
ab17dfd52f Simplify key checking algorithm
Since we dropped OpenSSL < 1.1.1 support, we can use
 EVP_PKEY_public_check() and EVP_PKEY_check()

Thanks to discussion in:
acb75afa6d
2023-05-16 09:49:46 +02:00
Christian Hohnstaedt
d606254f7a Additional attributes when printing PKCS#12 content 2023-05-14 21:49:49 +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 Hohnstädt
2ba114d393
Merge pull request #389 from sake/pkcs12_algo
PKCS12 encryption algorithm setting
2023-01-22 20:02:22 +01:00
Boris-Chengbiao Zhou
eb66836583 Fix command line parsing
Expected CLI option arguments weren't passed to the QCommandLineOption
constructor.
2023-01-08 00:54:35 +01:00
Tobias Wich
706ad7bf36 Add note where to find allowed PBE encryption schemes for PKCS12 2022-10-06 15:38:56 +02:00
Tobias Wich
097cbfb815 Add PKCS12 enc algo setting and use it when exporting PKCS12 2022-10-06 15:32:30 +02:00
Tobias Wich
ef8d90e5c5 Add PKCS12 encryption algorithm class 2022-10-06 15:15:11 +02:00
Tobias Wich
48acc326be Add PKCS12 encryption algorithm class 2022-10-06 15:01:16 +02:00
Tobias Wich
401b1a7a2b Use PBE algo for key and cert encryption in PKCS12 2022-10-06 11:25:25 +02:00
Christian Hohnstaedt
bd61f44e02 Refactor source file inclusion
No libraries needed. Just put all files as source to xca
and those needed for xcadoc to the xcadoc target.
Github Action: create deployments for each matrix result
2022-09-07 20:01:25 +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 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
1c5429160f Close #321 - extend commit d289f83a6d
If the digest name is not empty and not understood by openssl
raise an error immediately.
If the nid id NID_undef make sure no openssl-error is stored
in the error list.
2022-08-31 00:01:06 +02:00
Yaroslav Isakov
d289f83a6d Fix #321 - decryptKey shows OpenSSL error, which were raised before 2022-08-30 23:45:00 +02:00
Yaroslav Isakov
31e6fdd3ef Fix OpenSSL 3 compatibility in ED25519 smartcard code
Also, use proper defines instead of EC one
2022-08-06 22:36:33 +02:00
Christian Hohnstaedt
186657fbce Close: #366 Not Responding after upgrade
cache the results of visibility check as long as the search text remains.
This function is called many times when displaying the data,
even if the search string does not change.
2022-08-03 07:36:33 +02:00
Christian Hohnstaedt
ed475c8d9f Close #327: "Dump database" dumps everything to everywhere
Select the items to be dumped to the currently selected
directory.
2022-07-31 13:02:29 +02:00
Yaroslav Isakov
6d098460d6 Support importing ED25519 keys and signing with them, using PKCS#11 tokens
What works:
- Importing ED25519 Signature key from Yubikey token (OpenSC with openpgp driver, key generated via gpg)
- Creating self-signed certificate for CA, for Signature key from card
- Signing Certificates using new CA

I haven't tested other features, e.g. storing new certificate on card, so, they're probably broken
2022-07-28 22:54:32 +02:00
Melg Eight
3f6b0105a3
Enable usage of hashAlgo digest selected by user for CRL sign
Signed-off-by: Melg Eight <public.melg8@gmail.com>
2022-02-15 19:24:47 +03:00
Christian Hohnstädt
0d26913f40
Merge pull request #334 from melg8/fix_pkcs_8_private_key_encryption
Enables usage of aes_256_cbc for private key export
2022-02-11 22:00:00 +01:00
Melg Eight
7bef74fb74
Enables usage of aes_256_cbc for private key export
Signed-off-by: Melg Eight <public.melg8@gmail.com>
2022-02-10 10:27:24 +03:00
Melg Eight
3eeb33cb07
Fix new/delete mismatch 2022-02-09 05:37:04 +03:00
Christian Hohnstädt
06fbe10d24 cmake: fixup undefined variables
Remove unused variables, define variables for all platforms
and fix typo
2022-01-03 20:03:31 +01:00
Christian Hohnstädt
e92031cf0d Drop debugging output 2021-11-20 02:12:02 +01:00
Christian Hohnstaedt
c66354ec9d Close #317: "Please insert card: ..." message
... when multiple PKCS#11 slots are present

Use the same pkcs11 instance to close the session.

Kudos to Christian Svensson for not only finding and reporting
but also fixing this issue.
2021-11-19 09:41:40 +01:00
Christian Hohnstädt
44bf1b4e84 Fix detecting the language directory 2021-11-18 22:42:41 +01:00
Christian Hohnstädt
284b1fa3f4 Call getHomeDir() later, after global constructors
This helps getting the directory of the executable
for judging whether we are the portable app or not on windows
2021-11-17 21:50:44 +01:00
Christian Hohnstaedt
4d401792a9 OpenSSL: Avoid all FILE pointer operations, use QFile
For interoprability reason.
To enforce it, set "#define OPENSSL_NO_STDIO 1"
All file access is done by reading/writing from/to BioByteArray()
which is filled by QFile:readAll()

Drop CRYPTO_malloc_debug / CRYPTO_mem_leaks
which is unused and disabled since many years.
2021-11-13 23:53:11 +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 Hohnstädt
435602d524 Convert to native separators in calendar items 2021-11-13 14:49:02 +01:00
Christian Hohnstaedt
a70ffe4ff1 Move XcaDialog call from x509_super to XcaWarning 2021-11-13 14:49:02 +01:00
Christian Hohnstädt
6ea01e80f6 Refactor item export: separate GUI and database
Collect all export formats in pki_export.

Each export format has assigned acouple of flags, indicating,
whether they are text, concatenateable, encrypted, usable for
multiple selections or only for a single item.
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 Hohnstaedt
6efba2bb3e pkcs7: Fix endless loop when loading PKCS#7 via PEM import 2021-10-30 11:51:35 +02:00
Christian Hohnstädt
be1a44d0a8 Consolidate export types and format in pki_export class
Move the descriptons from the ExportDialog into the
new pki_export class.

Also translate the exportType::etype to F_* flags
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 Hohnstädt
3e858c877f Merge remote-tracking branch 'github/master' into main 2021-10-24 14:56:38 +02:00
Christian Hohnstädt
13b0992780 Set Key export format separately via context menu
The popping up query dialog during PEM export via Drag&Drop
and Ctrl-C during Key export was pretty annoying.
2021-10-24 14:41:25 +02:00
Christian Hohnstädt
810b5509b1 pem_format(): Move private key cases to pki_evp
Support "exportType::PKCS8_encrypt"
2021-10-02 08:21:52 +02:00
Christian Hohnstaedt
c752508979 Separate XCA Warning in Cmdline and GUI 2021-09-09 21:46:30 +02:00
Christian Hohnstaedt
e9f36fc72b Move storeItems() from db_base to XcaTeeView 2021-09-09 21:30:06 +02:00
Christian Hohnstädt
56c6df6c90 editComment: Move Gui elements to widgets/XcaTreeView
Another step to separate GUI from functionality
2021-06-19 13:18:48 +02:00
Christian Hohnstädt
8c0a5adc3a
Merge pull request #288 from PF4Public/pf/replace
Replace certificate while renewing
2021-06-04 08:50:58 +02:00
pf
8af3cabfa8 Replace certificate while renewing it
This commit also changes the default state of
the "Revoke old certificate" checkbox to unchecked.
The reasoning for this is that by renewing a certificate
its lifetime and subsequently validity are prolonged,
which therefore implies equal trustworthiness
for both new and old certificates, which does not intend
the revocation of the latter.
2021-06-01 20:25:13 +03:00