Commit Graph

75 Commits

Author SHA1 Message Date
Christian Hohnstaedt
2b3f4dd039 Combine #90 and #315 and support UPN in name constraints 2024-09-15 09:25:44 +02:00
Christian Hohnstaedt
cb1f02502d Close #90, #361: Name Constraints (RFC5280 section 4.2.1.10)
Some checks failed
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 5.15.2, ubuntu-latest) (push) Has been cancelled
CMake / build (build/xca-*-Linux.tar.gz, Unix Makefiles, linux, /usr, ubuntu, 6.6.2, ubuntu-latest) (push) Has been cancelled
CMake / build (build/xca-*.dmg, Unix Makefiles, mac, /opt/homebrew/opt/openssl, macos, 6.6.2, macos-latest) (push) Has been cancelled
CMake / build (build/xca-*.msi build/xca-portable-*.zip , MinGW Makefiles, windows, D:\msys2\msys64\mingw64, windows, 5.15.2, windows-2019, win64_mingw81) (push) Has been cancelled
Conversion of name constraints from certificate to Template
(Advanced Tab) and using them from there was working since long.

Now there is an additional input line, like (and next to)
SubjectAlternativeName with live validation and edit button
with guided input.

The conversion from cert to template now puts the extension
into the correct LineEdit and not on the Advanced Tab anymore.

However, XCA does NOT follow the constraints, yet.
It is still possible to issue certificates with arbitrary
names, independent of any "Name Constraints" in the CA.

This is what issue #239 asks for.
2024-09-14 23:53:59 +02:00
Christian Hohnstaedt
60ca584266 Close #315 Support UPN type for EAP/802.1X certificates
Replace "UPN:" by "otherName:msUPN;UTF8:" when generating
the extension from the Subject- and IssuerAlternativeName.

Extend the Edit dialog of the SAN and IAN by the "UPN" prefix.

Replace "otherName:msUPN;UTF8:" by "UPN:" when creating a template
from an existing certificate or request.

The OpenSSL config file export, the configuration display
and edit on the "Advanced Tab" are not afffected, since
this is an XCA syntax sugar, not supported by OpenSSL.

Update documentation
2024-09-06 10:07:51 +02:00
Christian Hohnstaedt
73f1029f52 Constify extList 2024-09-06 09:24:59 +02:00
Christian Hohnstaedt
0c1c00962f Fix whitespace errors 2023-12-30 11:01:11 +01:00
Christian Hohnstaedt
d36b32feac Close #402: Subject Alternative Name not filled by all CN
Iterate over all CN and add them to the SAN.
2023-10-13 00:57:13 +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
8f277ea781 x509v3_ext: Improve error-checking
Validate SAN, IAN, AIA, CRLDP during rollout.
Fix tab-switching when validating new certificate context.

Also work with X509_EXTENSION being nullptr
2023-05-25 22:18:48 +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
a70ffe4ff1 Move XcaDialog call from x509_super to XcaWarning 2021-11-13 14:49:02 +01:00
Christian Hohnstädt
1500e636c8 Drop OpenSSL backward compatibility hacks < 1.1.0
OpenSSL < 1.1.1 is out of support anyway
2021-05-09 12:25:32 +02:00
Christian Hohnstädt
496fb5e0bc Close #251: AuthorityKeyIdentifier: use issuer:always
When analysing and translating the AuthorityKeyIdentifier
extension to OpenSSL syntax, take an existing DirName
as "issuer:always", because openssle otherwise ignores it,
when the keyid succeeds.
2021-02-08 17:07:06 +01: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
1544065133 Extend --print and --text functionality 2020-03-13 12:13:27 +01:00
Christian Hohnstaedt
c7a0f14283 Close #116: Duplicate extensions erroneously shown
Dynamically add unknown OIDs with its numerical representation
to always resolve them to avalid NID.
2019-05-13 16:45:57 +02:00
Christian Hohnstaedt
4e68d40464 Revert "Extend #36: Automatic X509v3 extensions for CSR"
This reverts commit f1dc9b868a.
2018-07-10 05:54:20 +02:00
Christian Hohnstaedt
f1dc9b868a Extend #36: Automatic X509v3 extensions for CSR
Also apply "DNS:copycn" correctly when generating
PKCS#10 CSR
2018-07-07 07:08:23 +02:00
Christian Hohnstaedt
22966937de Close #36: Support adding CN to X509v3 SAN automatically
Translate the special text "DNS:copycn" in the SAN to
the final common name.

Add checkobox "Copy Common Name" to the SAN Edit box,
for a user-friendly editing of the "DNS:copycn"

During certificate creation, an empty common name together with
"DNS:copycn" in the SAN will raise a warning message and the
opportunity to change the settings.

Change the SAN in the HTTP-server XCA template from
"DNS:your.server.name.here" to "DNS:copycn" to already
take advantage of this feature in the default template.
2018-05-19 22:14:08 +02:00
Christian Hohnstaedt
84f25048a7 Remove xca_db_stat application 2018-03-05 07:46:10 +01:00
Christian Hohnstaedt
dda100c100 OSSL 1.1 vs. 1.0: Private keys 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
7f36322f0b OSSL 1.1 vs. 1.0: Extensions, Cert Details 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
2f61c8c711 SF. Bug. #107 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag
Gracefully handle malformed Netscape extensions i.e.
Expected IA5 strings not IA5 tagged
2015-09-17 13:02:48 +02:00
Christian Hohnstaedt
5b40ac664b Add Null-pointer-check and add support for OSCP_noCheck 2015-05-14 12:58:05 +02:00
Christian Hohnstaedt
c691c1cca5 Suuport nameConstraints and policyMappings when creating OpenSSL conf from cert 2015-05-14 12:58:05 +02:00
Christian Hohnstaedt
5fdb362f8c Support InhibitAnyPolicy and PolicyConstraint extensions
... when exporting certificates to templates or OpenSSL configs
2015-05-04 17:20:45 +02:00
Christian Hohnstaedt
9210df0626 Check Netscape extensions to be IA5 clean 2015-04-04 13:13:49 +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
0baa9173ea RedHat Bug #1164340 - segfault when viewing a RHEL entitlement certificate
...in X509V3_EXT_get v3_lib.c:15

Fix the x509v3ext copy constructor
2014-11-17 16:15:42 +01:00
Oliver Winker
4f7cd41732 Fix for openssl 1.0.1i
Fixes following application error

Errors
error:0D0C40D8:asn1 encoding routines:c2i_ASN1_OBJECT:invalid object encoding
error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error

Due to openssl 1.0.1i change:

   commit 03b04ddac162c7b7fa3c57eadccc5a583a00d291
   Author: Emilia Kasper <emilia@openssl.org>
   Date:   Wed Jul 2 19:02:33 2014 +0200

Commit messgae amended and
Signed-off-by: Christian Hohnstaedt <chohnstaedt@innominate.com>
2014-08-13 11:54:22 +02:00
Christian Hohnstaedt
38ed0b60b5 Update Copyright dates 2012-05-06 11:16:44 +02:00
Christian Hohnstaedt
90dadf57cd Fix IPv6 address handling in v3 extensions 2011-06-08 06:19:16 +02:00
Christian Hohnstaedt
9f237b923c open database with 0600 permissions
also avoid unused varaibles
2010-08-26 06:39:30 +02:00
Christian Hohnstaedt
be8dca7663 Support for generalname IPv6 addresses 2010-07-24 09:23:12 +02:00
Christian Hohnstaedt
9085ecbd4e More support for public keys
Extract public key from cert and request
Show public keys in requests- and cert-details in red
Allow using public keys for certs. Useful if not selfsigning
2010-07-22 06:57:32 +02:00
Christian Hohnstaedt
a7c40be095 After all we are able to convert all extensions to config
Add a button to the certificate detila dialog to show the
extensions as OpenSSL config

improve AuthKeyId

Allow selecting public keys for certificates.
This works if it is signed by an other cert.
2010-07-21 17:52:17 +02:00
Christian Hohnstaedt
766192d61c improve extension to conf functionality
get rid of ext_str_new() and ext_str_free()
use d2i() and XX_free() instead

support for unrecognized extensions as DER stream
improve altName: otherName
Support Bitfields: keyUsage and ns_certType
2010-07-20 21:03:29 +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
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
02de3bfb8c improve advanced extensions and cert2template functionality
- if subAltName, issAltName or crlDist contain commas, put them
   on the advanced tab
 - regard critical flag for the extensions above
2010-03-14 09:34:25 +01:00
Christian Hohnstaedt
f1c528fcc9 update copyright information 2010-03-11 07:13:48 +01:00
Christian Hohnstaedt
01fa5628ed improve key-value input
- add input validators
 - add information about valid characters and length
 - add translations
 - untranslate X509 specific expressions
 - add 'critical' checkbox to SAN IAN AIA CDP edit box
2010-02-27 09:20:47 +01:00
Christian Hohnstaedt
3b600c1c6b improve token handling
- support Token initializing
 - support deleting any certificates from tokens
 - fix prepare_card API
 - replace HTML entities when generating HTML ouput
2010-02-17 07:20:18 +01:00
Christian Hohnstaedt
30f186caa3 compile fix for openssl 1.0.0
- and remove trailing newline when displaying extension texts
 - show the correct year when displaying times. 2009 instead of 109
2009-12-07 19:34:57 +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
b5667920bd start certificate export to templates 2009-12-03 23:32:23 +01:00
Christian Hohnstaedt
9f900ae6f7 update copyright date to 2009 where appropriate 2009-11-24 17:54:21 +01:00
Christian Hohnstaedt
356cab3401 check for duplicate x509 v3 extensions
- while taking extensions from the request, the advanced tab
   and the other tabs, extensions may be duplicated.

   They will be now diplayed in
   detail and duplicates are found and shown clearly.
   Warning message will allow for modifications.

 - Fixes
    [ 1881482 ] Copy extensions from request seems to fail
    [ 1998815 ] xca adds basic constraint "CA" twice resulting in invalid CA
2009-03-03 21:52:32 +01:00