Commit Graph

19 Commits

Author SHA1 Message Date
Christian Hohnstaedt
993da2d474 Use C++11 initializers for all non-static class members
When XCA started in 2002, there were no C++ initializers.
Drop explicit initializers from the constructors.

 - Fix indentations of section declarators.
 - Replace NULL by nullptr when feasible.
 - Sort private section: properties first, then methods.
2023-10-08 22:19:18 +02:00
Christian Hohnstaedt
d606254f7a Additional attributes when printing PKCS#12 content 2023-05-14 21:49:49 +02:00
Christian Hohnstaedt
ea453d4336 Encapsulate all BIOs in the BioByteArray class
If we have a QByteArray (ba) and must provide it to
a BIO* expecting OpenSSL function, the following
construct provides it: BioByteArray(ba).ro()
directly providing the QByteArray buffer as BIO

It also supports mixed writes:
  BIO_write(bba, buf, size)
  bba += QByteArray
2020-04-06 22:07:57 +02: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
1544065133 Extend --print and --text functionality 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 Hohnstaedt
2fbadfc9f0 Update Copyright Years to 2020 2020-01-13 07:26:46 +01:00
Christian Hohnstaedt
1ea45c8da4 Constify fload() fromPEM_BIO() fromPEMbyteArray()
Use "BIO_from_QByteArray()" instead of "BIO_new_mem_buf()"

Replace qSort() by std::sort()
Replace QString::null by QString()
2020-01-06 21:30:29 +01:00
Christian Hohnstaedt
6f85548c07 Drop getClassName() 2018-03-30 14:38:09 +02: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
ac780d3e77 Fix PEM_BIO loading by using QByteArray instead of BIO and fmemopen 2017-07-15 06:51:37 +02:00
Christian Hohnstaedt
38ed0b60b5 Update Copyright dates 2012-05-06 11:16:44 +02:00
Christian Hohnstaedt
d9c3661608 Tell user about illegal files
Tell the user about any files that did not contain any crypto items
2010-06-19 14:28:25 +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
01c8b89edd autoimport from cmdline 2010-03-22 21:21:21 +01:00
Christian Hohnstaedt
f1c528fcc9 update copyright information 2010-03-11 07:13:48 +01:00
Christian Hohnstaedt
9f900ae6f7 update copyright date to 2009 where appropriate 2009-11-24 17:54:21 +01:00
Christian
8bfc1d1522 finalized PEM import 2007-08-27 18:44:19 +00:00
Christian Hohnstaedt
4ed20f5819 add pki_multi for multiple pki items. 2007-08-23 18:57:22 +02:00