Commit Graph

35 Commits

Author SHA1 Message Date
Christian Hohnstaedt
7376cce5a7 Improve export file / dir validation
- Still ask before overwriting files.
 - Error out if file name exists, but is not a file.
 - Ask to create non-existing directories
 - Check if an expected directory either really
   is a directory or does not exist.
2024-09-14 01:13:18 +02:00
Christian Hohnstaedt
ec3dec0b44 Relates #88: Select a common or individual passwords
When exporting items into encrypted files, the checkbox
"Same encryption password for all items" may be used to enter
one password once for all items.

Otherwise a new password dialog opens for each exported entry.
2024-09-14 01:13:18 +02:00
Christian Hohnstaedt
46c1b78577 Close #88: Export to multiple files
Extend the ExportFile dialog by a checkbox to
switch between "all-in-one-file" or every item in a separate
file. It is only visible if more than one file is selected.
Activating the checkbox will:
 - Change the file-input into a directory-input and cut off the
   file name
 - Disabling all formats that are intended for multiple items.
De-activating the checkbox will:
 - Change the directory-input back into a file-input
   and append the previously erased file name again.
 - Disabling all export-formats that are only useful for single items.
2024-09-14 01:13:18 +02:00
Christian Hohnstaedt
7f5bdb7dec Close #287: template don't save/restore correctly
Use the probably modified internal name of the template
in the template-details dialog before import.

Therefore the name of the qlineedit of the internal name of
all other details dialogs changed from "descr" to "description"
to match the name in the NewX509 dialog and to be found
by the "XcaDetails" class.

When exporting the template data, add the internal name and the comment
to the exported data.
The XCA template data is defined by us and can be modified.
This change is backwards and upwards compatible:
  New versions of XCA can read an old Template export and vice-versa.
2024-08-31 14:48:43 +02:00
Christian Hohnstaedt
80f457a9f3 Export Dialog: Avoid appending the wrong extension
If the current file extension does not match the first entry
in the "filter" section of the file dialog, the first extension
is erroneosuly appended to the file name.

Moving "All Files ( * )" in front as first entry avoids this.
2024-02-25 01:07:32 +01:00
Christian Hohnstaedt
8f05c3eac9 Close #465 Export PEM + Key in one File
Fix logical error when exporting in PEM format.
The key export part was not reached...

The diff is much smaller when displayed with -b to skip
indentation-only changes....

Drop the unused "F_PLUSKEY" flag and fix the Template export
2023-09-30 11:24:18 +02:00
Christian Hohnstädt
6ea01e80f6 Refactor item export: separate GUI and database
Collect all export formats in pki_export.

Each export format has assigned acouple of flags, indicating,
whether they are text, concatenateable, encrypted, usable for
multiple selections or only for a single item.
2021-11-13 14:49:02 +01:00
Christian Hohnstaedt
48bed71f79 Enable-disable PEM comment checkbox 2021-11-13 13:38:51 +01:00
Christian Hohnstädt
be1a44d0a8 Consolidate export types and format in pki_export class
Move the descriptons from the ExportDialog into the
new pki_export class.

Also translate the exportType::etype to F_* flags
2021-10-30 11:51:35 +02:00
Christian Hohnstaedt
c752508979 Separate XCA Warning in Cmdline and GUI 2021-09-09 21:46:30 +02:00
Christian Hohnstädt
52bf30e47b Visual Code adaptions 2021-06-01 17:48:37 +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 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
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
ef9b3aff3d Drop superflous includes from header files 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
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
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
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
c62339e1ce Adapt Certificate Index creation to the new database capabilities 2018-03-07 23:00:58 +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
Adam Dawidowski
e94e9133b1 Support generating an OpenSSL "index.txt"
XCA currently lacks support for generating an index.txt.
Such a file gets created and maintained when using CA
features in openssl. As mentioned here:
https://sourceforge.net/p/xca/discussion/209946/thread/6cbc727c/#2310
such a file can be used by Openssl's built-in OCSP responder.
Additionally, it can be used for configuring a cron job for
reminding of certificate expiration.

Certificate index export is added in 3 places:
 - command line (-i index.txt),
 - the Extras menu (Extra->Export Certificate Index) and
 - the selected file(s) export option in the context menu
   on the Certificates tab (Export->File, Export Format:
    Certificate Index file).

Please note that SubjectDN generated by this feature has
different formatting than the one generated by openssl.
2016-04-09 06:40: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
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
25a53441e9 Certificate export: Add option to export selected certificates to PEM or PKCS#7
Using the context menu only handles the current item.
This is now reflected by resetting the selection in case of
a context menu event
2015-04-15 08:41:29 +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
f8f730d41a Support exporting SSH2 public key to the clipboard 2015-04-07 20:22:24 +02:00
Christian Hohnstaedt
67d270b9ae Consolidate Export dialogs 2015-04-06 00:04:35 +02:00
Christian Hohnstaedt
40f33d37f0 SF Feat. Req. #76 Export private keys to clipboard
Before exporting the private key an acknowledge is
required. Here you may opt to only export the public key.

While at it, display the internal Name in export dialogs
2014-11-01 18:51:39 +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
19e0cf5e60 Don't reset certificate extension to .crt
... after closing the file-name select dialog during certificate export
2012-05-12 09:40:25 +02:00
Christian Hohnstaedt
5383c8c43f Consolidate export dialogs 2010-08-07 13:40:25 +02:00