Commit Graph

254 Commits

Author SHA1 Message Date
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
Christian Hohnstädt
3bce3ae1d6 Fix travis build
Add qttools5-dev-tools qttools5-dev
Fix warnings found by travis
2021-05-12 00:03:52 +02:00
Christian Hohnstaedt
7d564132ba Move ca-properties dialog to the certificate view
Reduce UI from QDialog to QWidget and display it in the XcaDialog frame.
Also move user interface specific code from the db_x509 class
into the CertTreeView class
2021-05-10 20:41:12 +02:00
Christian Hohnstädt
703d9c0ba7 sql: better handle SQL errors during insert
Don't pop-up a success message, but delete the item,
if an SQL error occures during insert.
2021-05-05 19:39:28 +02:00
Christian Hohnstaedt
b907103975 Update documentation 2021-04-28 22:27:04 +02:00
Christian Hohnstaedt
ff7704ff0b Add context sensitive documentation
All dialogs get the "Qt::WindowModal" modality to
operate the Help window in parallel
while also blocking the dialog parent windows.

The manageRevocations() moved from model to view

The Details dialogs become more self-sufficient.
There is a statc start method that shows the dialog and
updates name and comment after accept().
This allows recursive starts of certificate details and
independence of mainwin.
It is necessary to set the current toplevel widget as parent
for the next dialog to not block the application.
2021-04-23 15:50:13 +02:00
Christian Hohnstädt
c90302ddd8 Close #230: Change PKCS12 export extension from .p12 to .pfx
[Change Request] Consider changing PKCS12 export
extension from .p12 to .pfx by default,
as p12 is a legacy Netscape holdover,
and PFX is the 'standard' per RFC now.
2021-02-06 22:52:54 +01:00
Christian Hohnstädt
0745af1d63 Fix editing revocation entries and generate CRL from that dialog 2020-10-14 19:48:18 +02:00
Christian Hohnstädt
ed29b5f3a5 Fix typo to start CRL Management 2020-10-14 19:48:18 +02:00
Christian Hohnstaedt
17b621ccef Encapsulate all index.internalPointer() in fromIndex(index) 2020-05-10 09:09:31 +02:00
Christian Hohnstaedt
45f834a6e4 Move tree-handling from db_x509 class to the base class
This is a preparation for possibly inserting
structuring folder elements later.
2020-05-08 17:37:40 +02:00
Christian Hohnstaedt
af79214121 Use fromIndex(index) convenience function
for certificates create a function returning
a dynamically casted pki_x509 pointer

Add NULL check of dynamically casted pointer,
because it could be a folder...
2020-05-08 17:37:40 +02:00
Christian Hohnstaedt
1e544161f6 Eliminate the use of "mainwin" in lib/db_* 2020-05-08 11:59:09 +02:00
Christian Hohnstaedt
7c65a786ea Revamp database management
The global variable "Database" of class xca_db
can be used by any other class to access. No need
to provide it.

The "xca_db" class managed the "database_model" pointer.
Accessing the name of the current database has been unified.
2020-05-08 07:47:15 +02:00
Christian Hohnstaedt
b2ab7570b8 Minor fixxes and constifies 2020-04-30 18:47:28 +02:00
Christian Hohnstaedt
03633d7a8a Provide db class name through constructor 2020-04-30 18:44:36 +02:00
Christian Hohnstaedt
a3344100e3 Drop FOR_ALL_pki() makro and use a foreach() loop
The foreach loop iterates over all items of a type.
The iterate method is now superflous
2020-04-30 18:40:49 +02:00
Christian Hohnstaedt
5a64725556 Move item store from db_base into separate class "pki_lookup"
Since also pki_base and other classes need to access them.
2020-04-30 18:37:25 +02:00
Christian Hohnstaedt
5543ec2fb8 Merge branch 'master' into develop 2020-04-02 07:35:18 +02:00
Christian Hohnstaedt
b41d322069 Refactor native separators / and \ on windows.
Always only use forward slash /
Drop all "QDir::separator()" and "nativeSeparator()"
functions. Only use it where filenames are displayed for the user.
2020-04-02 06:12:47 +02:00
Christian Hohnstaedt
149ecda63c Fix index-hierarchy functionality
create target directory and name feature "hierarchy"
2020-03-23 06:39:30 +01: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
595cf9a722 Drop connNewX509() signal and slot
in the past it was used to connect the NewX509 dialog
with requests keys and certs.

The NewX509 dialog knows mainwin since some time
and thus can connect itself to models and views

mainwin: use model<T>() instead of models->model<T>()
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
ef9b3aff3d Drop superflous includes from header files 2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
3dd34a61bc Move "showPki()" from the model class to the view
The displaying function requires UI.
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
d0d387b03e Directly display the error instead of signaling others
The XCA_ERROR() is console-compatible and can be used
without GUI
2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
aa55a68782 Let pki_pkcs12 and pki_pkcs7 inherit from pki_multi
And ImportMulti handles pki_multi sufficiently
and does not need to know about pkcs12 or pkcs7

pkcs12 and pkcs7 don't need: print() getCa() addCaCert() numCa()
it is handled by pki_multi()

Take advantage of the power of dynamic_cast<>() instead of using
typeid()
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
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
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
84560e26e1 Fix certificate assignment importing a CA certificate
Fix finding our unassigned certificates when importing a CA
(issuerSqlId may be QVariant(int, 0) depending on the database)

Reassign certs from an older CA to the imported one.
2020-03-11 05:49:18 +01:00
Christian Hohnstaedt
212b385022 Fix Typo 2019-12-14 13:24:15 +01:00
Christian Hohnstaedt
2397ab72de Close #140: Certificate renewal with option to preserved serial number
Add checkbox (unchecked by default) to keep the old serial number
while renewing certificates
2019-12-06 15:28:09 +01:00
Christian Hohnstaedt
f43e7520db Support concurrent database access.
If a database is modified by another instance of XCA the passive
instance reloads and displays the changed parts.
2019-03-25 06:47:25 +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
c41bbf9b23 Close #82: Renew CA ROOT Cert
Enable renewal option in the context menu
for self-signed CA certificates
2019-03-12 22:11:52 +01:00
Christian Hohnstaedt
96151564ee Activate polish language in the language menu
Add Jacek as Maintainer in the about dialog
2018-10-11 06:00:21 +02:00
Christian Hohnstaedt
c88b0b7d70 Improve fix for #35: Configurable size of serial number.
Make sure the first octet of the serial is not 0 and not
interpretable as negative.
2018-07-07 06:58:21 +02:00
Christian Hohnstaedt
96d8c5cf37 Generalize handling of DateTime columns 2018-06-26 23:32:40 +02:00
Christian Hohnstaedt
22966937de Close #36: Support adding CN to X509v3 SAN automatically
Translate the special text "DNS:copycn" in the SAN to
the final common name.

Add checkobox "Copy Common Name" to the SAN Edit box,
for a user-friendly editing of the "DNS:copycn"

During certificate creation, an empty common name together with
"DNS:copycn" in the SAN will raise a warning message and the
opportunity to change the settings.

Change the SAN in the HTTP-server XCA template from
"DNS:your.server.name.here" to "DNS:copycn" to already
take advantage of this feature in the default template.
2018-05-19 22:14:08 +02:00
Christian Hohnstaedt
f0e6dc1f1b Close #35: Configurable size of serial number.
Allow to configure the previously fixed serial number length
of 64 bit between 8 and 256 bit
2018-05-19 18:09:28 +02:00
Christian Hohnstaedt
dc36728df8 Generate calender (.ics) files for certificate and CRL expiries
Also support consolidated calendar entries for a CA,
containing the CA, all issued certificates and the CRL expiry dates.
2018-05-10 12:49:59 +02:00
Christian Hohnstaedt
8d64db6be3 Const-ify remFromCont() 2018-04-24 23:10:46 +02:00
Christian Hohnstaedt
e95198e775 When overwriting an index.txt file, truncate it. 2018-04-09 05:21:22 +02:00
Christian Hohnstaedt
421ab5840a Minor bugfixes: PostgeSQL does not like setting an integer to "true"
Display renamed request in the NewX509 dialog correctly in the dropdown
2018-03-10 10:45:03 +01:00
Christian Hohnstaedt
c62339e1ce Adapt Certificate Index creation to the new database capabilities 2018-03-07 23:00:58 +01:00
Christian Hohnstaedt
4288aafe92 Improve automatic commenting actions 2018-03-07 20:51:46 +01:00
Christian Hohnstaedt
af0e0a75b9 Drop dnPolicy for now 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
d079dbde09 Collect affected items 2018-03-05 07:46:10 +01:00