Commit Graph

64 Commits

Author SHA1 Message Date
Christian Hohnstaedt
432293ad23 x509name: add module test and fix memory issues
Runing module tests with ASAN makes it easier to tackle mamory issues.
2023-10-15 21:15:28 +02:00
Christian Hohnstaedt
d56d47e7bb Related #405: manage X509_NAME in QSharedPointer 2023-10-15 21:15:28 +02:00
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
ded935b033 Prepare for Qt6: QRegExp -> QRegularExpression
QRegExp is deprecated and needs special library
in Qt6: core5compat

Replace by QRegularExpression which has been introduced by Qt5
2022-08-31 00:01:06 +02:00
Christian Hohnstaedt
ee842feb5e Improve windows compatibility 2022-08-31 00:01:06 +02:00
Christian Hohnstaedt
ef24c00c22 Minor fixes 2020-06-26 14:21:32 +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
30824964a2 hashNum() is an unsigned integer 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
ee93c576b9 Remove spaces from DN entries 2018-04-10 07:54:58 +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
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
413ba8bff3 OSSL 1.1 vs. 1.0: Cleanup CRL extensions 2017-06-19 08:33:29 +02:00
Patrick Monnerat
ad6c2baae5 Add support for OpenSSL 1.1.0
The API changed heavily. New functions arrived, old functions
disappeared and many structures became opaque.

This version of the patch implements pkcs11 signing as follows:
- openssl < 1.0.0: rsa & dsa without engine
- openssl 1.0.x: rsa, dsa & ec with engine
- openssl >= 1.1.0: rsa, dsa & ec without engine

In the operation, we therefore also gain implementation of dsa signing for openssl < 1.0.0 (ec disabled because EC_KEY_METHOD was not yet invented!).

I've given up trying to use a PKEY_ENGINE with openssl 1.1: seems not possible anymore.

I've succeeded compiling the patched xca with openssl 0.9.8n, 1.0.2j and 1.1.0e.
I've successfully tested pkcs11 signing using softhsm with openssl 1.0.2j and 1.1.0e.

The patch also removes gcc7 new warnings.
2017-06-19 08:32: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
cb6dc4427d SF Feat. Req. #70 ability to search certificates
Add a Search line into the status bar to quickly
limit the view of items to those matching the
wildcard pattern case insensitive.
2014-11-19 09:15:19 +01: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
0ec2462715 improve creating templates from cert
- enhance parsing of CRL-DP, SAN, IAN and AuthInfoAcc
- add support for CertificatePolicies
2010-07-20 07:28:51 +02:00
Christian Hohnstaedt
1c21bd8882 handle DistinguishedName entry length violations more userfriendly
previously violating stringlen constraints stated in RFC3280
was a hard error. Now it triggers a warning, that can be ignored.
2010-07-16 18:14:23 +02:00
Christian Hohnstaedt
19e936fe06 improve error messages for string encoding problems 2010-07-16 06:30:48 +02:00
Christian Hohnstaedt
bc806e46ff fix error message 2010-07-03 11:37:19 +02:00
Christian Hohnstaedt
143a9629ed x509name: replace errmsg assembly by openssl_error 2010-05-13 09:19:48 +02:00
Christian Hohnstaedt
f1c528fcc9 update copyright information 2010-03-11 07:13:48 +01:00
Christian Hohnstaedt
0230061855 replace allocated strings by QByteArray for datastorage 2010-03-08 07:50:08 +01:00
Christian Hohnstaedt
d362a9c51e add new Token-features
- replace occurances of "Smart Card" by "Token"
 - Support for creating keys on a token
 - Store existing keys on a token
 - delete keys and certs from a token
 - update docs
2010-02-17 07:20:18 +01:00
Christian Hohnstaedt
5d00ffadfb for unknown DN entries display the OIDinstead of "unknown"
- add OID of nameDistinguisher to oids.txt
2009-12-05 12:54:15 +01:00
Christian Hohnstaedt
7f3ce42d4d finish certificate to request transformation
- Implement feature request [2213094] and [1108304]
2009-12-05 09:07:04 +01:00
Christian Hohnstaedt
9f900ae6f7 update copyright date to 2009 where appropriate 2009-11-24 17:54:21 +01:00
Christian Hohnstaedt
0aced7f2c4 improve Smart-card handling
- if PublicKey or Cert CKA_LABEL fails, try CKA_SUBJECT
 - don't use CKA_VALUE attribute on PUBLIC_KEY,
   because not everyone supports it.
   While being at it, add code for DSA and EC Cards.
 - load PKCS#11 engine only after database open.
 - avoid reloading the DLL on windows, because it is not supported.
   Windows users need to restart XCA after changing the PKCS#11 path
 - fix getSlotList() and return a QList<unsigned long>
2009-11-11 22:58:34 +01:00
Christian Hohnstaedt
37971649a9 improve the automatic internal name detection 2007-06-20 10:43:46 +02:00
Christian
0195dcf746 Request attributes added
- remove extension and attribute tab in details dialog if
   no extensions or attributes available
 - documentation updated
   X509 request attributes (like challange password) can be set and viewed.
2007-05-28 16:33:13 +02:00
Christian
eefbf7efde Merge branch 'qmake'
Conflicts:

	lib/func.cpp
	lib/func.h
	lib/pki_base.h
	lib/pki_x509super.h
2007-04-29 23:57:57 +02:00
Christian
c2018c0e58 - fix segfault
- switch string handling to UTF8
2007-04-29 18:48:17 +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 Hohnstaedt
62ddb24ab3 add RFC2253 representation of subject and issuer to copy&paste 2007-02-19 10:25:18 +01:00
Christian
13df281013 more info to distinguished name 2007-02-11 20:19:43 +01:00
Christian Hohnstaedt
a1d1df1ee5 code beautifying
remove unneeded functions
remove unneeded "serial" column from request list
2007-01-31 18:00:22 +01:00
Christian
f585e8fd07 Export and Context menu for CRLs added
Export for CSRs
2006-11-24 00:40:22 +01:00
Christian Hohnstaedt
51510e9390 remove sleepycat from licence info
add connects for edit and doubleClick
2006-11-14 23:04:16 +01:00
Christian
813e115b8e Spaces deleted 2006-05-21 10:08:39 +02:00
chris2511
462eac83a3 certificates for QT4 2006-03-12 23:57:24 +00:00
chris2511
c6622680db push forward to QT4 2006-03-12 17:39:52 +00:00
chris2511
d80d1ff6d2 small fixes 2005-05-23 18:23:19 +00:00
chris2511
f56bf74ba5 add support for building on Mac OS X
including app dir and dmg
Fix extension bug for requests
2005-05-17 23:41:53 +00:00
chris2511
dc15434e09 add support for statically and dynamically linked libraries
remove 2 memleaks
2005-05-16 14:03:04 +00:00
chris2511
0091853a73 changes in building,
DSA keys
key format in database changed to contain the public key and
the private one in encrypted form.
2005-02-07 21:56:21 +00:00
chris2511
dd953112d7 *** empty log message *** 2003-12-11 23:41:09 +00:00
chris2511
de21ec1e0f memory leaks searched for 2003-12-10 06:43:04 +00:00
chris2511
94f37c622c information about -b for basedir,
changes for Mingw32 and MSVC++
2003-12-04 22:17:20 +00:00