Commit Graph

174 Commits

Author SHA1 Message Date
Christian Hohnstaedt
5b7aa117fa NewX509: select correct help context by tab
Especially removing tabs will shuffle the numbers.
Set the help context as tab-widget objects name.
2021-05-02 23:11:22 +02:00
Christian Hohnstaedt
2eb621e6e4 NewX509: directly call the NewKey and RequestDetail dialog
instead of calling it indirectly through signal-slot
mechanism.
This way we can set ourselves as parent to work
properly with Qt::WindowModal modality.
2021-05-02 22:59:41 +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
7f9f61c5c7 Issue a warning when using an insecure hash algorithm
md5, ripemd160 and sha1 are considered insecure.
Issue a warning if one of them is used.
2021-04-01 14:02:59 +02:00
Christian Hohnstädt
24009b13c7 Fix warnings 2020-10-14 19:48:17 +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
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
9bdbecbd9f Improve translation 2020-03-29 22:33:57 +02:00
Christian Hohnstaedt
4f1103a64f Close #72: Add checkbox for OCSP staple feature
Also support them in XCA template and transformation from
certificate and request.
2020-03-29 22:23:21 +02:00
Christian Hohnstaedt
c4eb23f2af Close #172 #46: Multiple OCSP Responders
also fixes "#46 AIA, simultaneous OCSP and caIssuers"

Move "OCSP/caIssuers" index from a separate drop down
into the single dropdown of URI/IP/DNS...

This change not only fixes the bug, but also removes some
special handling for the AIA extension.

Adding features by deleting code is highly appreciated :-)
2020-03-20 16:29:43 +01:00
Christian Hohnstaedt
0cbf179074 Close #172 #46: Multiple OCSP Responders
also fixes "#46 AIA, simultaneous OCSP and caIssuers"

Move "OCSP/caIssuers" index from a separate drop down
into the single dropdown of URI/IP/DNS...

This change not only fixes the bug, but also removes some
special handling for the AIA extension.

Adding features by deleting code is highly appreciated :-)
2020-03-18 05:26:16 +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
c89b6aff29 Move NID lists for ExtendedKeyUsage and DistinguishedName
into lib/oid.h
2020-03-11 07:19:56 +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
2fbadfc9f0 Update Copyright Years to 2020 2020-01-13 07:26:46 +01:00
Christian Hohnstaedt
ae94faebaf Transfer Key Usage and Extended Key Usage critical flags
When transforming certificate or request extensions
into a template, the (e)keyusage critical flags storage
had a typo:
  "eKyUseCritical" instead of "ekuCritical" and
  "keyUseCritical" instead of "kuCritical"

Also the eKeyUse value was not transformed completely.
2020-01-07 06:08:30 +01:00
Christian Hohnstaedt
2682edacfd Close #48 The SKI tickbox isn't generating an SKI extension for CSRs
Since the first support of extensions for CSR (2005),
the Subject Key Identifier has been skipped.
Enable it, while still removing issuer extensions.

Better fix "Automatic X509v3 extensions for CSR"
2018-07-10 23:04:47 +02:00
Christian Hohnstaedt
3c87ff1ea0 Remove code duplication with CSR information
Unstructured name and challange password use the
distinguished name code (setupExplicitInputs)
2018-06-22 06:21:37 +02:00
Christian Hohnstaedt
5703ad855a Separate the internal name from distinguished name 2018-06-22 06:20:33 +02:00
Christian Hohnstaedt
15d33fdcfc Make the dynamic DN entry adaption configurable.
If the option is selected, the behavior from the
previous commit is enabled. Otherwise, the
explicit DN entries stay as configured.
2018-06-21 20:29:45 +02:00
Christian Hohnstaedt
efa29c0e7c Inspired by #39: Dynamically adjust explicit DN entries
When editing a template or applying a template during
certificate or request generation, the explicit entries
are reordered by the current order of the template subject.

All entries that are mentioned in the explicit DN entry
configuration setting, but not part of the template DN
are appended.
2018-06-21 20:28:23 +02:00
Christian Hohnstaedt
2a0f96e810 Close #39: Subject entries shuffled
Strictly keep order of DistinguishedName entires.

This fixes a bug introduced by dcd940b6b8
 "SF Feat. Req. #57 More options for Distinguished Name"
2018-06-21 20:13:21 +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
7c4be863f1 Constify x509name and use getMostPopular() when filling the internal name 2018-03-30 14:38:09 +02:00
Christian Hohnstaedt
820278014b Closes #10: Warn if certificate without any extension is created
Don't warn on requests or templates without extensions.
2018-03-19 17:28:07 +01: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
6e432238e7 Generalize, simplify and unify settings management
Add settings class to access the settings table in the database
Cache values and improve database writes.
Options dialog simplified
Replace getSetting / storeSetting
Unpack option flags to rows in the settings
2018-03-10 09:04:54 +01:00
Christian Hohnstaedt
4288aafe92 Improve automatic commenting actions 2018-03-07 20:51:46 +01:00
Christian Hohnstaedt
e6c92ce890 Improve transactions, fix CA template and CRLdays import
Make ItemCombo a template class
2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
24d1f85a26 Make use of C++ templates for more type-safety 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
07594d1edd Rebase on master 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
e624743494 Add PKI Source: generated, imported, transformed 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
263ed5c101 Fixup for 'Beautify mandatory distinguished name entriy errors'
... which resulted in an error message when creating certificates
about a mandatory subject field 'undefined'

Because QString("").split(",").count() == 1 ????
2018-03-01 22:50:56 +01:00
Christian Hohnstaedt
5189bd08af Beautify mandatory distinguished name entriy errors 2018-02-23 09:16:19 +01:00
Christian Hohnstaedt
3f35cdccf8 Cleanup the OID text files, remove senseless aia.txt
- Remove all aia.txt from the Code, Documentation and ToolTip
- Add an Operating system dependent help hint
- Replace unix LF by DOS CR-LF for windows installation
2018-02-01 00:05:40 +01:00
Christian Hohnstaedt
1ae80c1af7 Do not apply the default template when creating a similar cert 2017-07-12 19:35:21 +02:00
Christian Hohnstaedt
6ac9389361 Make OID resolver Non-modal and let other widgets display details
- column items with context menus
 - double-click labels of the DN and X509v3 extensions
2015-10-01 13:39:11 +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
fe969553c3 Don't validate notBefore and notAfter if they are disabled. 2015-09-17 13:02:48 +02:00
Christian Hohnstaedt
698c10216f Add option for disabling the very very legacy Netscape extensions
Maybe this setting will become the default in future releases....
2015-04-09 18:49:03 +02:00
Christian Hohnstaedt
58bf2816c2 Also support creating similar requests 2015-04-04 13:13:49 +02:00