Commit Graph

751 Commits

Author SHA1 Message Date
Christian Hohnstaedt
b63f50b28b Add more error checks and remove code duplication 2018-03-01 22:10:52 +01:00
Christian Hohnstaedt
365507b36e SF Bug #122 isValid() tried to convert the serial to 64 bit
With OpenSSL 1.1.0 this results in an error message
if the serial was too long.
With OpenSSL 1.0.x it didn't.
2018-03-01 22:06:23 +01:00
Christian Hohnstaedt
bdbaa0a946 Support Dragging certificates and other items as PEM text
Also dragging PEM test into XCA opens the import Dialog
2018-02-20 23:47:17 +01:00
Christian Hohnstaedt
4b9b8e9973 Add more openssl error checks during database load to tackle Bug #122 2018-02-13 11:47:22 +01:00
Christian Hohnstaedt
eb6382d6aa Remove SPKAC support. Netscape is not of this world anymore.
I discovered some bugs in SPKAC handling and fixing them was hard.
Because of this bugs noone may have used the feature in the past.

Remove it.
2018-02-13 11:47:21 +01:00
Dancho Penev
b0d131e79a SF bug #124 Wrong assumptions about slots returned by PKCS11 library
When using PKCS11 library to manage smart cards the code assumes
that all slots returned by the library call are not empty.
In some cases Gemalto's library returns list of slots in which the
first one is empty and the second one is occupied by the smart card,
this causes xca to report an error and isn't able to use the smart card.
2018-02-07 11:10:04 +01:00
Christian Hohnstaedt
3f35cdccf8 Cleanup the OID text files, remove senseless aia.txt
- Remove all aia.txt from the Code, Documentation and ToolTip
- Add an Operating system dependent help hint
- Replace unix LF by DOS CR-LF for windows installation
2018-02-01 00:05:40 +01:00
Christian Hohnstaedt
8333482eef Improve behavior regarding additional OIDs
Depending on the OpenSSL version some OIDs are known, some are not.
When reading "oids.txt" file and adding the new OID definitions:
 - Silently skip definitions that are 100% identical to the OpenSSL values.
 - Give a hint to change identifiers that are used for a different OID
 - Give a hint about definitions that differ to remove them from the file.
   Also accept them as Alias when reading dn.txt and eku.txt
2018-01-31 20:15:07 +01:00
Christian Hohnstaedt
fc4bdaf196 Refine and document Entropy gathering 2018-01-29 14:57:07 +01:00
Christian Hohnstaedt
715b263998 Indicate development and release version by git commit hash
Fix "qmake" build for qt4 and qt5
2018-01-28 11:36:37 +01:00
Christian Hohnstaedt
1d2a1b18c4 Fix dumping private keys during "Dump database"
If the database password is empty, dumping private keys
resulted in an error message.

Fix this by setting the encryption algorithm to NULL if
the password is empty.

Additionally throw the error after closing the filedescriptor.
2018-01-27 12:52:17 +01:00
Christian Hohnstaedt
27482fc080 Fix Null pointer exception when importing PKCS#12 with OpenSSL 1.1.0
Setting the EVP_PKEY type deletes the key with OpenSSL 1.1.0

Reported by Perederyaev Ivan. Thank you.
2018-01-27 12:48:13 +01:00
Christian Hohnstaedt
eaabb2a28d SF Bug #110 Exported private key from 4096 bit SSH key is wrong
Actually, it just differs. It is PKCS#8 instead of PKCS#1
2018-01-06 21:18:31 +01:00
Christian Hohnstaedt
0ba41583fb SF Bug #109 Revoked.png isn't a valid image
It was unused and did not harm. No functional/optical impact.

Delete image and all ist references
2018-01-06 21:17:15 +01:00
Christian Hohnstaedt
704d98b071 Remove duplicate X509_CRL_set_issuer_name()
Found by "Patrick Monnerat <patrick@monnerat.net>"
Thank you
2017-11-29 08:01:19 +01:00
Christian Hohnstaedt
de7b368355 Of course we support Big Endian machines. Remove debugging mechanism
At least during coding. I have not Big Endian platform to
verify the expression above.
2017-11-23 12:44:02 +01:00
Christian Hohnstaedt
8867727926 Refuse overwriting unknown files 2017-11-17 15:53:30 +01:00
Christian Hohnstaedt
2bced828de Translation: Re-translate the OID resolver in case of a language change 2017-11-17 09:06:56 +01:00
Christian Hohnstaedt
8ebaa683ff Translation: Also translate validity dates to the configured language 2017-11-17 09:06:56 +01:00
Christian Hohnstaedt
b9bd5a9344 Fix GCC-6 warning -Wmisleading-indentation 2017-10-25 09:21:12 +02:00
Tino Mettler
f0699d055f Fix further spelling errors found by lintian packge checker 2017-10-24 12:15:58 +02:00
Christian Hohnstaedt
d1a34b8329 Fix Hash algorithm when converting certificate to PKCS#10
Use the one from the certificate instead of SHA1
2017-10-04 23:21:02 +02:00
Christian Hohnstaedt
cefb140601 Switch to Qt5 for Windows build and installation
Don't depend on htonl() and friends to avoid lwsock32
Fixup WIN32 define to use the Qt definition
2017-07-17 09:27:46 +02:00
Christian Hohnstaedt
f12c3ca8aa Improve Copy&Paste behavior: Accept Ctrl-V and MousePaste on MainWindow 2017-07-15 06:51:37 +02: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
5fbd102493 Fix for MacOS X builds 2017-07-15 06:51:37 +02:00
Christian Hohnstaedt
1ae80c1af7 Do not apply the default template when creating a similar cert 2017-07-12 19:35:21 +02:00
Christian Hohnstaedt
22b441046a SF: #120 Crash when importing CA certificate for certificates which already exist
The QAbstractItemModel is simetimes called with column index -1
Catch those calls.
2017-07-12 19:35:21 +02:00
Christian Hohnstaedt
4ef4c9ad87 SF #116 db_x509.cpp:521: Mismatching allocation and deallocation: cert
free(cert) -> delete cert
2017-07-10 09:12:37 +02:00
Christian Hohnstaedt
b22d82a3f9 OSSL 1.1 vs. 1.0: Windows support 2017-07-08 06:57:04 +02:00
Christian Hohnstaedt
8429817bf0 Typo in openssl-compat 2017-06-30 21:13:06 +02:00
Christian Hohnstaedt
d14b3bf5ed OSSL 1.1: Windows does not know "fmemopen()" 2017-06-19 09:52:33 +02:00
Christian Hohnstaedt
dda100c100 OSSL 1.1 vs. 1.0: Private keys 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
f7e485393c OSSL 1.1 vs. 1.0: EVP 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
a279a8e43e OSSL 1.1 vs. 1.0: Cleanup CRL 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
413ba8bff3 OSSL 1.1 vs. 1.0: Cleanup CRL extensions 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
3f20bce3f9 OSSL 1.1 vs. 1.0: Drop some #ifdef from the pkcs11 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
9d2ed957dd OSSL 1.1 vs. 1.0: Purge BIO_QBA_mem_buf() 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
Christian Hohnstaedt
62a1711c3b OSSL 1.1 vs. 1.0: Revocations 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
39c2e86ee0 OSSL 1.1 vs. 1.0: Improve Key generation 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
f0c7badf0b OSSL 1.1 vs. 1.0: Store sigAlg as NID instead of Object 2017-06-19 08:33:29 +02:00
Christian Hohnstaedt
077c061d0e OSSL 1.1 vs. 1.0: Add openssl_compat.h centralizing the #ifdef Hell 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
Adam Dawidowski
0d34bc1c1c Extend generating an OpenSSL "index.txt"
Updated patch adds another export option automating the creation
of multiple index.txt files to be used with multiple ocsp responders.

New export option is available via command line (-I index.txt) and
the Extras menu (Extra->Export Certificate Index hierarchy).

The option causes the creation of an index.txt file containing
index records for all the children certificates of a parent.
The filenames are generated using the supplied name as prefix
and append a dot and the simplified Internal Name
(the Internal Name stripped of non-alphanumeric characters except underscores).
2016-09-06 20:03:55 +02:00
PF4Public
c0130feafa Some pedantic edits 2016-04-09 06:40:39 +02:00
Adam Dawidowski
e94e9133b1 Support generating an OpenSSL "index.txt"
XCA currently lacks support for generating an index.txt.
Such a file gets created and maintained when using CA
features in openssl. As mentioned here:
https://sourceforge.net/p/xca/discussion/209946/thread/6cbc727c/#2310
such a file can be used by Openssl's built-in OCSP responder.
Additionally, it can be used for configuring a cron job for
reminding of certificate expiration.

Certificate index export is added in 3 places:
 - command line (-i index.txt),
 - the Extras menu (Extra->Export Certificate Index) and
 - the selected file(s) export option in the context menu
   on the Certificates tab (Export->File, Export Format:
    Certificate Index file).

Please note that SubjectDN generated by this feature has
different formatting than the one generated by openssl.
2016-04-09 06:40:39 +02:00
Christian Hohnstaedt
fa38a21a04 Merge Release 1.3.2 based fixes from Tino Mettler and Christohper Knadle 2016-02-11 09:09:51 +01:00
Christohper Knadle
2f3a1de7ac Fix spelling errors found by lintian packge checker 2016-02-11 09:08:38 +01:00
Christian Hohnstaedt
806312800d Thales nCipher key generation changes for EC and DSA keys
Developed and tested by
 Mak, Mcken <Mcken.Mak@thalesesec.com>

Thanks!
2016-01-16 07:54:54 +01:00