Commit Graph

74 Commits

Author SHA1 Message Date
Christian Hohnstaedt
196219283b Improve headerlist. Don't overload isNumeric
isNumeric now is a virtual function of the dbheader class
and overloaded by subclasses if needed.

The strict connection isNumeric == AlignLeft is removed
and a new virtual function alignment() is used to return the alignment.
By default this is "isNumeric() ? Qt::AlignRight : Qt::AlignLeft;"
but can now be overridden in sub-classes.

the key_dbheader sub-class vanished an got replaced by
the num_dbheader class with the capability to set the type to hd_key
2025-03-30 11:24:39 +02:00
Christian Hohnstaedt
a70ffe4ff1 Move XcaDialog call from x509_super to XcaWarning 2021-11-13 14:49:02 +01: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
0e5af2e452 Replace check_oom() by Q_CHECK_PTR()
Qt offers the functionality. No need to invent it ourselves.
2021-06-01 17:48:37 +02:00
Christian Hohnstaedt
0c5603ec20 XcaWarning: Split into Core and GUI element
one more step to split core and GUI components
2021-06-01 17:48:37 +02:00
Christian Hohnstädt
68273d0a30 Switch from autotools/qmake to cmake
Why?
 - QT will switch from qmake to cmake sooner or later.
 - autotools are good for unix-ish systems, cmake also for
   macOS and Xcode as well as Windows and VS-code
 - Cross compiling the windows-binaries on linux
   is not very helpful to attract windows-centric
   developers.

Also drop qmake's xca.pro
Generate man-page and sphinx sources of commandline arguments
during build by executing xca (xcadoc.cpp).
Generating Version-patchlevel and git hash is now also
OS independent.
2021-06-01 17:48:37 +02:00
Christian Hohnstaedt
17b621ccef Encapsulate all index.internalPointer() in fromIndex(index) 2020-05-10 09:09:31 +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
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
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
98593e7462 Compatibility fixes for QT4 and OpenSSL 0.9.8
Need to drop support for those ancient libs.
Not, yet.
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
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
a1fedfaf9e Fix building against OpenSSL without EC.
This commit amends b982245995
which broke the NO_EC build
2020-03-11 05:56:54 +01:00
Christian Hohnstaedt
b982245995 Close #163: Show key type/size on column of Certificates tab
Reuse HD_key_type, HD_key_size, HD_key_curve IDs from the key tab.
They use the "hd_key" type to put them into a context-submenu.

The certificate either uses the existing or a temporary key
and calls its "column_data()".

Simplify the submenu logic for the context-menu.
2020-02-12 22:42:36 +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
96d8c5cf37 Generalize handling of DateTime columns 2018-06-26 23:32:40 +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
4288aafe92 Improve automatic commenting actions 2018-03-07 20:51:46 +01:00
Christian Hohnstaedt
14421f4ed3 Update Issuer and Key name in the Certificate, Request and CRL details
after editing double-clicked element.
2018-03-05 07:46:11 +01:00
Christian Hohnstaedt
dc75fa0171 Add token as item source, minor fixes
Use dynamic cast for sqlSELECTpki()
Fix Double-click links in cert details
2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
a545659e1a Add Source column, fix Revocation management 2018-03-05 07:46:10 +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
PF4Public
c0130feafa Some pedantic edits 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
7029db8847 Add Cert/Req Column for Signature Algorithm 2015-04-03 14:52:39 +02:00
Christian Hohnstaedt
a88b86ad9d Select the translation language via File menu 2014-11-20 20:14:25 +01:00
Christian Hohnstaedt
b131e1d293 Consolidate more "established x509 terms"
like basic constraints, key usage and netscape-thingies
2014-11-14 22:54:35 +01:00
Christian Hohnstaedt
0ac34f6812 More translation code (x509 terms) 2014-11-14 09:27:39 +01:00
Christian Hohnstaedt
82bb0e9f33 Translate header and tooltips 2014-11-14 09:27:39 +01:00
Christian Hohnstaedt
a97b8f9add Select whether to translate established x509 terms 2014-11-13 20:10:18 +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
38ed0b60b5 Update Copyright dates 2012-05-06 11:16:44 +02:00
Christian Hohnstaedt
610a20d1f2 Add x509v3 extensions to the list of selectable columns
Requests and certificates can display the extensions in the table
and be sorted by them.

make the key identifiers display in numerical style
2011-06-21 22:06:39 +02:00
Christian Hohnstaedt
2502a0531f Feature Request [3286442] Make success/import messges optional 2011-04-30 07:53:39 +02:00
Christian Hohnstaedt
7155c65ecb support exporting requests and certs as openssl config file 2011-01-24 18:23:02 +01:00
Christian Hohnstaedt
ca3129d07e Improve XCA witout EC
opening a database with EC keys and certs is possible now.
2011-01-10 07:02:24 +01:00
Christian Hohnstaedt
d89f56d9a4 Bug #3047703 not only mark the first CSR as signed
All CSRs with this keay are marked as signed or not.
2010-08-19 07:17:42 +02:00
Christian Hohnstaedt
3d5f196753 Fix Bug [3047029] CSR remains signed while Cert is deleted
check sign-status after deleting a certificate

also fix another double-word "findByByPubKey" -> "findByPubKey"
2010-08-17 17:21:06 +02:00
Christian Hohnstaedt
3bb40f477d fix column property management
remember size and autoResize for every column
use own dataformat for storage

add "internal name of the key" column for certs and requests
2010-08-04 08:23:19 +02:00