Commit Graph

77 Commits

Author SHA1 Message Date
Christian Hohnstaedt
802a8787cf Adaptions to stay OpenSSL 3.0 alpha16 compatible 2021-05-12 08:49:28 +02:00
Christian Hohnstädt
1500e636c8 Drop OpenSSL backward compatibility hacks < 1.1.0
OpenSSL < 1.1.1 is out of support anyway
2021-05-09 12:25:32 +02:00
Christian Hohnstaedt
c528c37986 Merge branch 'master' into develop 2020-04-05 10:58:47 +02:00
Christian Hohnstaedt
4314b0ead9 constify slotid 2020-04-05 09:16:12 +02:00
Christian Hohnstaedt
2d0980d4f6 Use pkcs11_lib_list as model for Options:pkcs11list
Change pkcs11List from QListWidget to QListView
The pkcs11_lib_list holds the data of the loaded libraries.
For the model a QList "model_data" is used to
hold indexes into QList dirs to allow duplicates,
moves and removes.

On windows it now displays the paths with \ separators.
2020-04-05 09:16:12 +02:00
Christian Hohnstaedt
928ff6458c Improve and fix qDeleteAll()
qDeleteAll() does not clear the QList.
Add it, if necessary.

Use dynamic_cast where appropriate
2020-03-20 16:29:42 +01:00
Christian Hohnstaedt
aacd9ee5f6 Make XcaProgress and WAITCURSOR cmdline compatible 2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
19eafe1739 Improve and fix qDeleteAll()
qDeleteAll() does not clear the QList.
Add it, if necessary.

Use dynamic_cast where appropriate
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
e4d0ab8f8e Refactor Image and icon ressources 2020-03-11 07:19:56 +01:00
Christian Hohnstaedt
a90d7b5b0d Improve password input handling
Unify password results
Retry on password verification error
Honor the users wish to exit
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
ced0995862 Close #91: Change order of "PKCS#11 provider"
With this commit PKCS#11 libraries may be reordered
and enabled or disabled.

The slot selection dialog iterates over all enabled and successfully
loaded libraries in the configured order and collects the slots
of each of them.

In the options dialog the library info is shown in the tool-tip
2019-03-21 06:12:51 +01:00
Christian Hohnstaedt
bfe6fbbc43 Close #24: Add LibreSSL support. Tested with LibreSSL 2.7.2 2018-04-22 16:12:04 +02:00
Christian Hohnstaedt
3eef4bd12b Fix translation artefacts.
No need to translate "X Certificate and Key management",
"Form", "Dialog" or "TimeInput"

"Select Token" and "New Key" window titles were never shown.
Remove them.
2018-03-28 08:13:22 +02:00
Christian Hohnstaedt
e1b982a346 Replace printf by qDebug 2018-03-05 07:46:10 +01:00
Dancho Penev
b0d131e79a SF bug #124 Wrong assumptions about slots returned by PKCS11 library
When using PKCS11 library to manage smart cards the code assumes
that all slots returned by the library call are not empty.
In some cases Gemalto's library returns list of slots in which the
first one is empty and the second one is occupied by the smart card,
this causes xca to report an error and isn't able to use the smart card.
2018-02-07 11:10:04 +01:00
Christian Hohnstaedt
3f20bce3f9 OSSL 1.1 vs. 1.0: Drop some #ifdef from the pkcs11 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
077c061d0e OSSL 1.1 vs. 1.0: Add openssl_compat.h centralizing the #ifdef Hell 2017-06-19 08:33:29 +02:00
Patrick Monnerat
ad6c2baae5 Add support for OpenSSL 1.1.0
The API changed heavily. New functions arrived, old functions
disappeared and many structures became opaque.

This version of the patch implements pkcs11 signing as follows:
- openssl < 1.0.0: rsa & dsa without engine
- openssl 1.0.x: rsa, dsa & ec with engine
- openssl >= 1.1.0: rsa, dsa & ec without engine

In the operation, we therefore also gain implementation of dsa signing for openssl < 1.0.0 (ec disabled because EC_KEY_METHOD was not yet invented!).

I've given up trying to use a PKEY_ENGINE with openssl 1.1: seems not possible anymore.

I've succeeded compiling the patched xca with openssl 0.9.8n, 1.0.2j and 1.1.0e.
I've successfully tested pkcs11 signing using softhsm with openssl 1.0.2j and 1.1.0e.

The patch also removes gcc7 new warnings.
2017-06-19 08:32:39 +02:00
Christian Hohnstaedt
806312800d Thales nCipher key generation changes for EC and DSA keys
Developed and tested by
 Mak, Mcken <Mcken.Mak@thalesesec.com>

Thanks!
2016-01-16 07:54:54 +01:00
Christian Hohnstaedt
e5541c6d67 SF. Bug. #81 Make xca qt5 compatible
Extend XCA to also compile against Qt5
Remove directory from Qt includes
2015-09-17 18:42:42 +02:00
Christian Hohnstaedt
d55eb917e2 Silence compiler warnings about unused parameters 2015-08-11 07:17:56 +02:00
Christian Hohnstaedt
854d0dbde5 Minor fixes, remove debugging output 2015-05-18 17:51:20 +02:00
Christian Hohnstaedt
2909e79317 Move entropy functions into new class
Read and write .rnd file during start and exit
2015-04-08 06:54:55 +02:00
Christian Hohnstaedt
1138dad902 SF Bug #102 Weak entropy source used for key generation
On startup use "/dev/random" and "/dev/hwrng"
as additional entropy for the OpenSSL random pool.

Collect mouse position and key press time entropy
for seeding the openssl random pool before generating keys.

When using Smartcards, use the Smartcard RNG
as additional entropy source.
2015-04-06 14:19:10 +02:00
Christian Hohnstaedt
277b25af62 Check for crashes in PKCS#11 library and inform the user 2015-02-22 17:00:06 +01:00
Christian Hohnstaedt
c8e517912a Refine PKCS#11 ECC named curve workaround for www.CardContact.de 2014-11-22 11:50:37 +01:00
Christian Hohnstaedt
7b4ea0c130 Fix DSA token signing 2014-11-13 20:10:18 +01:00
Christian Hohnstaedt
b9dd27a915 Fix EC token key generation 2014-11-13 20:10:18 +01:00
Christian Hohnstaedt
9321c92f3e DSA add Token keygen for DSA and start DSA token signing 2014-11-12 22:19:43 +01:00
Christian Hohnstaedt
2512a22aa7 Load and store DSA keys on a token 2014-11-12 22:19:43 +01:00
Christian Hohnstaedt
6927dc1b0c Fix signed/unsigned warning 2014-11-05 06:57:46 +01:00
Christian Hohnstaedt
65debf1e60 Fix my ENGINEs memory and reference handling
and remove some unused things
2014-11-01 10:02:57 +01:00
Christian Hohnstaedt
fed1a9584a Remove debugging code 2014-10-31 07:21:11 +01:00
Christian Hohnstaedt
8ed9bab7df Support EC key generation on PKCS#11 token
move EC builtin sources into extra class and file
2014-10-31 00:23:39 +01:00
Christian Hohnstaedt
ad93cebf5c PKCS#11: Make EC and RSA signatures work with ENGINE WIP 2014-10-31 00:17:19 +01:00
Christian Hohnstaedt
9710a78592 First preparation of version 1.0.0
update changelog and documentation
avoid warnings about unused variables
2014-04-11 19:29:46 +02:00
Christian Hohnstaedt
8168ca5181 QMessageBox: protect against HTML parsing
The default message box displays the message as HTML
Don't do that.

Thanks to Artur Czyz (artur_czyz at wp.pl) for finding it.
2014-04-11 19:29:45 +02:00
Christian Hohnstaedt
38ed0b60b5 Update Copyright dates 2012-05-06 11:16:44 +02:00
Christian Hohnstaedt
cb128e675b improve stoken selection dialog 2011-07-16 10:18:16 +02:00
Christian Hohnstaedt
1a3a417bb6 cleanup after closing a db and reset settings before opening it
Since OpenSC is not part of XCA anymore, set the default
PKCS#11 lib on windows to C:\WINDOWS\system32\opensc-pkcs11.dll

Also disable Token menu after closing a database.
2011-07-15 07:18:18 +02:00
Christian Hohnstaedt
a710c1751f mark public keys and certificates explicit as public 2011-04-30 17:42:56 +02:00
Christian Hohnstaedt
b622e64209 consolidate Password and Pin input dialogs
change storage type of passwords from char[] to QByteArray
Create PwDialog class and drop passWrite and passRead
Create Passwd class derived from QBytearray
move PKCS12 password input to PwDialog
2011-04-30 07:53:26 +02:00
Christian Hohnstaedt
b59ecd1410 add extra checks for pkcs#11 lib
lt_dlopen() asserts the filename, so assure
valid content
add validity checks when using the session p11slot
2010-10-30 08:05:21 +02:00
Christian Hohnstaedt
9eaad7020a Fix PKCS#11 library handling
In case of an empty PKCS#11 library list, the default was
selected again.
Now the list remains empty and the Token menu stays disabled.
2010-09-01 18:40:43 +02:00
Christian Hohnstaedt
05d347743f Show message box when Pin entry via Pinpad is necessary 2010-08-28 16:52:58 +02:00
Christian Hohnstaedt
23ad77b6f0 Support multiple PKCS#11 provider 2010-08-11 23:12:48 +02:00
Christian Hohnstaedt
d34cc82e1f avoid the need of pkcs11 engine
the sole use of the engine was signing.
But on the other hand it had to be compiled for all platforms
and it prevented the use of multiple PKCS#11 libs.
2010-08-10 21:58:51 +02:00
Christian Hohnstaedt
f572eb3898 Messageboxes use the Buttongroup
The buttongroup behaves as expected on different Environments

update translation
2010-08-06 19:08:14 +02:00
Christian Hohnstaedt
de851ed3a9 Changed all header includes to QT4 names and included the correct component name
By Andreas Piesk. Thanks!

adapt to HEAD since the patch is based on 0.6.4

drop qt4/Qt include in list of includes during configuration
2010-06-13 11:49:38 +02:00