Commit Graph

116 Commits

Author SHA1 Message Date
Christian Hohnstaedt
8aedb35716 Improve database update message 2018-03-05 07:46:11 +01:00
Christian Hohnstaedt
03124f6f70 Put the database schema into a different file for documentation 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
add9f50e29 Undelete not working 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
af0e0a75b9 Drop dnPolicy for now 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
7a553da38a Transaction around Settings update 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
d079dbde09 Collect affected items 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
0f582044e2 More transaction 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
0b82028644 Add "Legacy Database" as additional source 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
d36e6eb0cb Implement nested transactions.
The DbTransaction class automatically rolls back when the scope
is left (destructor) and no commit happenned.

Every transaction begin will increment the counter,
each commit/rollback will decrement it. Only if all transactions
finished with a commit, a final database commit will be performed.
2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
3f016c62e7 Fix minor problems during db open and key import 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
07594d1edd Rebase on master 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
fed2dd711a Minor fixes 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
e1b982a346 Replace printf by qDebug 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
431076c90e Change private key encryption in the database to PKCS#8 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
d50dbbd726 Create indexes 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
fbde63e98d Add Views and a concept of schema updates 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
fc7fc357ac Support opening remote databases MySQL and PostgreSQL 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
2a0a4630ae Extend authority table and fix CaProperties 2018-03-05 07:46:09 +01:00
Christian Hohnstaedt
fe6062f16e No more increasing serials. Only random serials. 2018-03-05 07:46:09 +01:00
Christian Hohnstaedt
4598ddb4de Convert QByteArray.base64() to QString before writing it to the DB 2018-03-05 07:46:09 +01:00
Christian Hohnstaedt
a75eb6ebd8 Avoid LastInsertID 2018-03-05 07:46:09 +01:00
Christian Hohnstaedt
4b3ee2c705 Switch database format to SQL(ite)
This is a large squash of many small commits.

Allow porting data from the legacy format to SQL.
Store Binaries base64 encoded and use db->transaction
Update password hash to be 8000 x SHA512 with 8 byte Salt
Add revocations table and fixup CRL generation
Add comment and insertion date columns

Fix column saving, remove trust, add XcaDialog
Allow changing the internal name and comment in Cert/Req details view
Extend Comment functionality, Replace About.ui by XcaDialog.ui
2018-03-05 07:42:36 +01:00
Christian Hohnstaedt
9e4340ff83 Open options dialog if weak hash is configured 2017-11-13 18:05:05 +01:00
Christian Hohnstaedt
cfc65af48a Add warning if the default hash algorithm is SHA1 or less 2017-11-13 17:40:15 +01: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
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
85d2a26aa9 Fix all fopen() calls to always use "wb" or "rb"
fix PKI item autodetection
Fix compiler warning because of a changed OpenSSL 0.9.8/1.0.1
  "PEM_load_bio()" API change
2015-05-20 13:14:21 +02:00
Christian Hohnstaedt
75a6d117f3 Refactor context menu
Better support multiple selections
 - Export all selected items into one PEM file
 - Batch Revoke/unrevoke/renew of many selected certificates
   of the same issuer
 - allow exporting templates as PEM

Add Feat. Reg. #83 Option to revoke old certificate when renewing

Always put all signed certificate to the newest CA.
If a CA certificate is renewed, all certificates issued by
the old CA are now shown as signed by the new one.
2015-05-17 09:17:04 +02:00
Christian Hohnstaedt
90f351b2cb Refactor CRL handling 2015-04-20 18:25:59 +02:00
Christian Hohnstaedt
58142b487c Fix syntax errors in documentation and english phrases
Thx Patrick Monnerat <Patrick.Monnerat@datasphere.ch>
2015-04-10 19:27:05 +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
c0603eff21 Don't setup default PKCS#11 library 2015-02-22 06:24:12 +01:00
Christian Hohnstaedt
6f20a17ff9 Allow to remove the default database setting
... by setting "As default database" if no database is open
2014-11-22 09:46:34 +01:00
Christian Hohnstaedt
a88b86ad9d Select the translation language via File menu 2014-11-20 20:14:25 +01:00
Christian Hohnstaedt
cb6dc4427d SF Feat. Req. #70 ability to search certificates
Add a Search line into the status bar to quickly
limit the view of items to those matching the
wildcard pattern case insensitive.
2014-11-19 09:15:19 +01:00
Christian Hohnstaedt
aaf9339eab Database hardening
- Delete invalid items (on demand)
- Be more tolerant against database errors
- Gracefully handle and repair corrupt databases
- Add "db_dump(.exe)" binary to all installations
2014-11-15 23:45:43 +01:00
Christian Hohnstaedt
82bb0e9f33 Translate header and tooltips 2014-11-14 09:27:39 +01:00
Christian Hohnstaedt
8aa5141078 Optionally allow hash algos not supported by the token
Especially EC and DSA signatures are only defined
with SHA1 in PKCS#11 v2.20 spec
2014-11-13 20:10:18 +01:00
Christian Hohnstaedt
a97b8f9add Select whether to translate established x509 terms 2014-11-13 20:10:18 +01:00
Christian Hohnstaedt
dcd940b6b8 SF Feat. Req. #57 More options for Distinguished Name
Make explicit DN subject entries configurable
per database.
2014-11-12 22:19:44 +01:00
Christian Hohnstaedt
8ee27f862b Create user dir before writing the "recent databases" 2014-11-12 22:19:43 +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
1b0730eb0d SF Feature Req. #69 Create "Recent databases..." file menu item
Add the menu, which contains the last 10 opened databases
2014-04-11 19:29:46 +02:00
Christian Hohnstaedt
df78e4380e SF Bug #87: Unable to set default key length
Added a "Remember as default" checkbox to the key input dialog.
The default key size is now 2048 for RSA and DSA keys.
2014-04-11 19:29:45 +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
10436bf753 Differentiate between invalid and undefined date
Undefined end dates are described in RFC-5280
Invalid dates should never ever arise in certificates.

Add configuration option to disable the colorization of expired dates.
2012-04-10 13:09:09 +02:00
Christian Hohnstaedt
5f4d3e1084 Bug #3485139 Exception when creating certificates in passwordless db
Fix key decryption in case of an empty password.
Use "" instead of NULL for EVP_BytesToKey()
2012-03-31 14:28:37 +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