Commit Graph

76 Commits

Author SHA1 Message Date
Christian Hohnstaedt
03633d7a8a Provide db class name through constructor 2020-04-30 18:44:36 +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
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
ef9b3aff3d Drop superflous includes from header files 2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
241d7e9c7f Move newItem() function from model to view
Move CRL and Template data collection via UI to
the appropriate views
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
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
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 Hohnstädt
39f358e23f
Merge pull request #84 from chipitsine/master
resolve possible null pointer dereference
2019-05-14 17:50:05 +02: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
Ilya Shipitsin
1e0ca9f755 resolve possible null pointer dereference
[lib/db_temp.cpp:104] -> [lib/db_temp.cpp:103]: (warning) Either the condition 'if(temp)' is redundant or there is possible null pointer dereference: temp.
2018-11-14 23:04:56 +05: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
e6c92ce890 Improve transactions, fix CA template and CRLdays import
Make ItemCombo a template class
2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
d36e6eb0cb Implement nested transactions.
The DbTransaction class automatically rolls back when the scope
is left (destructor) and no commit happenned.

Every transaction begin will increment the counter,
each commit/rollback will decrement it. Only if all transactions
finished with a commit, a final database commit will be performed.
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
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
a3900b1473 Several fixes for templates, key encryption etc. 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
fc7fc357ac Support opening remote databases MySQL and PostgreSQL 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
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
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
c00db626c5 Support editing the CRL number when generating CRLs 2015-05-17 13:22:47 +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
a88b86ad9d Select the translation language via File menu 2014-11-20 20:14:25 +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
9f237b923c open database with 0600 permissions
also avoid unused varaibles
2010-08-26 06:39:30 +02:00
Christian Hohnstaedt
58a5557f96 don't allow duplicate key names 2010-08-19 18:36:42 +02:00
Christian Hohnstaedt
3a92d46362 fix crash during item-import
replace reference to the view by signals/slots
2010-08-05 07:22:00 +02:00
Christian Hohnstaedt
ced687be5b Improve column handling
right-align numeric columns and make them monospaced.
Save their current state in the database.
Also add column-menu to the other context menu

fix minor bugs

Support for "Unstructured Name" and "challange password" columns
	in the request-table
Support for name hash as used by OpenSSL to lookup certs.
	As table column and as distinguished name information
2010-08-01 06:50:49 +02:00
Christian Hohnstaedt
603cc7d9be Improve Columns of all Items Feature Request [849713]
Keys: Sort Keysize numerical
Certs: CA, fingerprints, start date (notBefore)
Crl: CRL number , Last update

Requests, Crls, Templates, Certs: All subject items and the full name
2010-07-30 06:54:14 +02:00
Christian Hohnstaedt
de851ed3a9 Changed all header includes to QT4 names and included the correct component name
By Andreas Piesk. Thanks!

adapt to HEAD since the patch is based on 0.6.4

drop qt4/Qt include in list of includes during configuration
2010-06-13 11:49:38 +02:00
Christian Hohnstaedt
670c45e268 Update translation and messages
- extended russian translation by Pavel Belly
 - dropped approach to create sentences from different parts
   like "Successfully created %1 '%2'" with %1 being "the certificate"
   and %2 being the name. This leads to trouble for other languages.
   Therefore I decided to mention the whole sentences and accept
   the many, almost duplicated sentences.

 - Consolidate german translation:
   . Smart card/Smartcard -> Chipkarte
   . Besitzer -> Inhaber
   . Unterschriftsanfrage/Zertifikatsanfrage -> Zertifikatsantrag

 - Support translations for pki_*.cpp by adding Q_OBJECT
2010-05-17 06:51:24 +02:00
Christian Hohnstaedt
f1c528fcc9 update copyright information 2010-03-11 07:13:48 +01:00
Christian Hohnstaedt
00eccfe98f add informational messageboxes
- for keys, requests, certificates, crls or templates
 - when successfully created or imported one.
2010-02-23 19:17:44 +01:00
Christian Hohnstaedt
345cdc1083 improve messages and usability
- update german translation
2010-02-21 16:24:00 +01:00
Christian Hohnstaedt
66c7db0350 Start implementation of SmartCard support
- use PKCS#11
 - load keys and showing them works
2009-10-28 18:54:22 +01:00
chris
596376630b minor changes after Geoffs patch
- use "All files ( * )" not only for MAC
 - fix the Bug found by him
 - fix X509_REVOKED_dup() again
 - New entry in Hall of fame
2008-01-08 20:42:26 +01:00
Geoff Beier
909b6c309c [PATCH] mac build fixes and minor usability improvements
This patchset adds:
- configure.mac now looks for qmake, backs up xcode project, uses xca.pro to generate a new one, generates a different local.h
- mac-package.sh generates a standalone .app bundle for distribution using deployqt from trolltech labs, packages up manual, COPYRIGHT, etc into a .dmg
- mac packaging niceties in the qmake project
- mac icon file
- usability fixes for OS X:
	- look for user configured oids and such in ~/Library/Preferences/xca if it exists
	- look for original ones in app bundle/Contents/Resources (it tried to do this before...)
	- more robust code for getting bundle location (less likely to be broken by Apple in OS revisions)
	- start browsing for files in ~/Documents
	- fix wildcards on mac so files without extensions will be opened
	- fix save behavior for .xdb files so that it's hard to get one that doesn't end in .xdb, as this causes difficulty w/Qt

Notes:
	- one of the compilation fixes was in the new revocation data function that replaced the old macros... I didn't have time to verify that my fix doesn't break when used with 0.9.8.
	- QStringToAsn1() is clearly incorrect but I haven't yet determined what callers expect, so I just called it out in a comment and did not yet fix it
	- I added some code that I haven't tested on Windows because I thought it might be a nice function to have there too. I have not added anything to call that function, however, since I don't currently have a machine I can test on :). The code is clearly marked in comments.
2008-01-06 13:48:39 +01:00
Christian
57cdbd7ba4 fix typos and nconf extensions 2007-11-23 22:50:45 +01:00
Christian Hohnstaedt
deec9eb993 Minor changes
- Add predefined templates to the list of templates
 - fix extension duplication bug in post 0.6.3 release
 - change Password dialog text properties
 - remove unused/duplicate code in lib/pki_key.cpp
2007-08-13 13:53:30 +02:00
Christian
8283d8e7b9 replace copyright notice in source files
(copyright and licence itself remain unchanged)
fix configure to set Qt include dir
code justifying
2007-04-12 12:25:28 +02:00
Christian
d4a90be207 replace "include <Qt/" by "include <" 2007-04-11 11:19:22 +02:00
Christian Hohnstaedt
6ef29e0761 remove deletition and readding of rootitem
readd templates known from earlier XCA versions,
but more flexible.
2007-02-06 13:01:53 +01:00