Christian Hohnstaedt
ea453d4336
Encapsulate all BIOs in the BioByteArray class
...
If we have a QByteArray (ba) and must provide it to
a BIO* expecting OpenSSL function, the following
construct provides it: BioByteArray(ba).ro()
directly providing the QByteArray buffer as BIO
It also supports mixed writes:
BIO_write(bba, buf, size)
bba += QByteArray
2020-04-06 22:07:57 +02:00
Christian Hohnstaedt
5543ec2fb8
Merge branch 'master' into develop
2020-04-02 07:35:18 +02:00
Christian Hohnstaedt
d54aa116db
Avoid unused variable warning for OpenSSL 0.9.8
2020-03-29 22:33:57 +02:00
Christian Hohnstaedt
9c55caf82f
Merge branch 'master' into develop
2020-03-23 06:53:06 +01:00
Christian Hohnstaedt
92846d6b38
Close #174 : Microsoft's PVK RSA private key format
...
Support Import and export private and public PVK keys.
2020-03-22 08:12:38 +01:00
Christian Hohnstaedt
9183f300c8
Add support for validating a keyjob
...
In case of an invalid keyjob bail out.
2020-03-18 05:26:16 +01:00
Christian Hohnstaedt
ef9b3aff3d
Drop superflous includes from header files
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
a48ea10e3d
Split key generation and data-collection-UI
...
Use the key job to transfer the information
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
77519936e0
Invent keytype class for mapping type mechanism and name
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
c5208f1cd7
Consolidate headers, unguard delete operator
2020-03-11 07:19:56 +01:00
Christian Hohnstaedt
e4d0ab8f8e
Refactor Image and icon ressources
2020-03-11 07:19:56 +01:00
Christian Hohnstaedt
7d0ab9d787
Add pki_XXX(const pki_XXX*) constructor
...
pki_XXX(const QString) -> (const QString &)
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
2fbadfc9f0
Update Copyright Years to 2020
2020-01-13 07:26:46 +01:00
Christian Hohnstaedt
1ea45c8da4
Constify fload() fromPEM_BIO() fromPEMbyteArray()
...
Use "BIO_from_QByteArray()" instead of "BIO_new_mem_buf()"
Replace qSort() by std::sort()
Replace QString::null by QString()
2020-01-06 21:30:29 +01:00
Christian Hohnstaedt
8726c8b96d
Improve item loading. Inspired by #153
...
If Loading the item results in an openssl error,
even if the item is not empty, discard it.
Otherwise loading it from the database later on will fail.
Improve "autoIntName()"
2020-01-06 19:35:11 +01:00
Christian Hohnstaedt
212b385022
Fix Typo
2019-12-14 13:24:15 +01:00
Christian Hohnstaedt
5e3d5e0edc
Cancel creating a new database if database-password dialog is cancelled.
...
Clicking cancel in the password dialog during database creation
does not trigger an assertion during key generation/import
anymore.
2019-03-27 05:58:15 +01:00
Christian Hohnstaedt
fa704001ca
Also change File loading from FILE* to QFile
2019-03-18 06:25:20 +01:00
Christian Hohnstaedt
026d8f8e6d
Extend PEM files by human readable information about the item
...
This can be enabled or disabled during export.
Move from FILE* to QFile
2019-03-18 06:25:20 +01:00
Christian Hohnstaedt
742e1536d7
Fix Private key verification
2019-03-14 06:35:25 +01:00
Christian Hohnstaedt
1bc340a0ef
Close #104 : Also show sha256 digests of public keys
...
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.
2019-03-14 06:35:24 +01:00
Christian Hohnstaedt
56687bfc83
Verify imported keys thoroughly
...
When importing keys, a verification by signing and verifying
some random data is performed now.
2018-12-06 05:50:09 +01:00
Christian Hohnstaedt
bdfa10d4d5
Close #45 : Unable to view Public Key
...
Allow displaying the public key of a certificate
or request without importing it.
When importing certificates or CRLs,
display the issuer if it exists in the database.
2018-07-01 14:58:23 +02:00
Christian Hohnstaedt
b362ae3593
Const-ify dbheader in column_data() and getIcon()
2018-04-25 09:34:45 +02:00
Christian Hohnstaedt
b74642fa09
Const-ify QSqlRecord of restoreSql()
2018-04-24 09:34:34 +02: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
cd118e4e72
Fixup for "Assure traditional file format if PKCS#8 NOT selected"
...
Also RSA and DSA keys were marked as EC PRIVATE KEY.
Add break to the switch statement
2018-04-09 05:18:19 +02:00
Christian Hohnstaedt
ec5507412e
Fix private key import of PKCS12 and PEM keys
2018-04-06 06:01:05 +02:00
Christian Hohnstaedt
3073bcd105
Fixup previous commit to build on Qt4
2018-04-04 22:39:50 +02:00
Christian Hohnstaedt
4c75d43b87
Assure traditional file format if PKCS#8 NOT selected
2018-04-04 19:24:16 +02:00
Christian Hohnstaedt
5fdd84c82c
Fix Importing PKCS#12 and PKCS#7 files
2018-03-30 21:34:00 +02:00
Christian Hohnstaedt
6f85548c07
Drop getClassName()
2018-03-30 14:38:09 +02:00
Christian Hohnstaedt
2c20bd109a
Constify and Pure-Virtual pki_base and derived classes
2018-03-30 14:38:09 +02:00
Christian Hohnstaedt
6cf72a38e0
Remove superflous function and mark decryptKey as pure virtual
2018-03-30 14:38:09 +02:00
Christian Hohnstaedt
0776ead694
Acceppt empty password for private key decryption
...
d2i_PKCS8PrivateKey_bio does not accept
passwords with 0 length for whatever reason.
2018-03-12 16:15:30 +01:00
Christian Hohnstaedt
0ed9f6926c
GitHub Bug #5 : Exporting a private key results in too-permissive permissions
...
Add umask(077) for key export
2018-03-10 14:43:36 +01:00
Christian Hohnstaedt
4867cfb8ab
Improve "Dump database" filename
2018-03-07 05:49:46 +01:00
Christian Hohnstaedt
80471cd3f3
Small fixes: MySQL does not like "DEFAULT (0)"
2018-03-06 16:45:42 +01:00
Christian Hohnstaedt
d079dbde09
Collect affected items
2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
a3900b1473
Several fixes for templates, key encryption etc.
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
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
fbde63e98d
Add Views and a concept of schema updates
2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
e624743494
Add PKI Source: generated, imported, transformed
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
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
1d2a1b18c4
Fix dumping private keys during "Dump database"
...
If the database password is empty, dumping private keys
resulted in an error message.
Fix this by setting the encryption algorithm to NULL if
the password is empty.
Additionally throw the error after closing the filedescriptor.
2018-01-27 12:52:17 +01:00