Commit Graph

157 Commits

Author SHA1 Message Date
Christian Hohnstaedt
a12b2e94f5 Close #129 Unattended Installation. Switch to MSI installer
Improve Windows installation xca.wxs

Move documentation to "html" dir and translations to "i18n"
in the portable-app and the MSI installation
Modyfies getDocDir() and Introduces getI18nDir()

Drop Nullsoft installer files
2020-01-20 22:33:05 +01:00
Christian Hohnstaedt
a05349e917 Portable App: xca.exe path differs from registry install path
Even better select the initial working directory
2020-01-19 08:48:02 +01:00
Christian Hohnstaedt
580a2fae2b Close #93 Default output folder / Improve Portable App usability
- allow setting a database as default
- Strip xca-app-folder from database and export filenames.
  This allows renaming/moving the portable app and open the default DB
  and use the working directory inside the folder
- Remember database history and configured language
2020-01-13 07:26:46 +01:00
Christian Hohnstaedt
23a737bbfa Constify getLibExtensions() 2020-01-13 07:26:46 +01:00
Christian Hohnstaedt
8f3335be0f Improve lib detection 2019-03-21 05:25:21 +01:00
Christian Hohnstaedt
1bc340a0ef Close #104: Also show sha256 digests of public keys
Print digest of public keys in the key details in different formats:

Print SHA256 SSH digest as used to by SSH users:
	ssh-keygen -l -f ~/.ssh/id_rsa.pub

Print SHA1 X509 key digest as shown in the
	Subject key identifier of a certificate

Print SHA256 digest as in:
	openssl pkey -pubout -outform DER < key.pem | sha256sum
as requested by this issue.

Refactored digesting functionality by a generic Digest()
function working with QByteArrays.
The function formatHash() now also expects a QByteArray input.
2019-03-14 06:35:24 +01:00
Christian Hohnstaedt
00fbb85c70 Improve on portable App and registry access 2018-11-07 18:30:14 +01:00
Christian Hohnstaedt
91faa1b675 Improve portable App 2018-11-05 06:21:14 +01:00
Christian Hohnstaedt
eba8be37b8 Make PKCS11 libs, working dir and main-window size host-dependent
A "hostId" determines the current host and is appended to
the "workingdir", "pkcs11path" and "mw_geometry" settings
in the database. This allows opening the database
on different hosts without wrong workingdir or not
loadable PKCS#11 libraries
2018-10-29 22:24:22 +01:00
Christian Hohnstaedt
00bd36f19b Support for XCA as portable App
On Windows XCA goes in portable mode if no XCA registry entry is found.
On Mac and Unix it checks the XCA_PORTABLE environment to be non-empty.
In portable mode:
 - The current working directory is not written to the database
 - The configured language and history of opened databases is
   forgotten after a restart of XCA
 - No registry entry is required nor written.
 - No unexpected files are written to disk, except exported items.
 - Portable mode is displayed in the "About" dialog

If setup.exe or "make install" are not used,
 - XCA is not assigned as app for any file types
2018-10-25 16:43:19 +02:00
Christian Hohnstaedt
6f8ca8dd65 Improve DN translation notation 2018-10-25 16:43:19 +02:00
Christian Hohnstaedt
dc36728df8 Generate calender (.ics) files for certificate and CRL expiries
Also support consolidated calendar entries for a CA,
containing the CA, all issued certificates and the CRL expiry dates.
2018-05-10 12:49:59 +02:00
Christian Hohnstaedt
f1e0a867fe Fix includes for func.cpp windows build 2018-03-11 19:32:56 +01: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
4288aafe92 Improve automatic commenting actions 2018-03-07 20:51:46 +01:00
Christian Hohnstaedt
e1b982a346 Replace printf by qDebug 2018-03-05 07:46:10 +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
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
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
d14b3bf5ed OSSL 1.1: Windows does not know "fmemopen()" 2017-06-19 09:52:33 +02:00
Christian Hohnstaedt
9d2ed957dd OSSL 1.1 vs. 1.0: Purge BIO_QBA_mem_buf() 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
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
d55eb917e2 Silence compiler warnings about unused parameters 2015-08-11 07:17:56 +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
2909e79317 Move entropy functions into new class
Read and write .rnd file during start and exit
2015-04-08 06:54:55 +02:00
Christian Hohnstaedt
c0603eff21 Don't setup default PKCS#11 library 2015-02-22 06:24:12 +01:00
Christian Hohnstaedt
a88b86ad9d Select the translation language via File menu 2014-11-20 20:14:25 +01:00
Christian Hohnstaedt
82bb0e9f33 Translate header and tooltips 2014-11-14 09:27:39 +01:00
Christian Hohnstaedt
e50dc5824e Switch to autoconf for the configure script
Adapt build system paths and windows build script
2014-11-05 14:05:58 +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
38ed0b60b5 Update Copyright dates 2012-05-06 11:16:44 +02:00
Christian Hohnstaedt
ec524b6d89 Fix "basename()" to detect \ and / on win32 platforms
Even on W32  platform the fileseparator in paths sometimes is "/".
Solution: Always convert all \ to / and only recognize / as separator

also fixes 22e3975e7e better
2012-04-10 13:09:13 +02:00
Christian Hohnstaedt
22e3975e7e Win32: use QDir::separator instead of / to compress filenames 2012-03-23 06:59:34 +01:00
Christian Hohnstaedt
323923f00c Add PKCS#11 library searching facility
Also fix dir-separator on W32
2011-07-20 07:21:31 +02:00
Christian Hohnstaedt
e7260c9288 avoid minor warnings 2011-07-17 08:54:15 +02:00
Christian Hohnstaedt
1a3a417bb6 cleanup after closing a db and reset settings before opening it
Since OpenSC is not part of XCA anymore, set the default
PKCS#11 lib on windows to C:\WINDOWS\system32\opensc-pkcs11.dll

Also disable Token menu after closing a database.
2011-07-15 07:18:18 +02:00
Christian Hohnstaedt
b622e64209 consolidate Password and Pin input dialogs
change storage type of passwords from char[] to QByteArray
Create PwDialog class and drop passWrite and passRead
Create Passwd class derived from QBytearray
move PKCS12 password input to PwDialog
2011-04-30 07:53:26 +02:00
Christian Hohnstaedt
84998b6ca3 reduce overlong filenames
Thanks Andreas Piesk
2011-02-02 18:12:38 +01:00
Christian Hohnstaedt
41c23f9f70 Feature Request [3058196] Autoload database
Add menu entry "Set as default DataBase"
to store the name of the currently open database as default DB
to be opened on startup.
2010-10-02 08:11:25 +02:00
Christian Hohnstaedt
8b8d6255bf Prepare release 0.9.0 2010-08-29 10:28:32 +02:00
Christian Hohnstaedt
9924d39668 set sane start dir for PKCS#11 lib selection 2010-08-14 11:01:31 +02:00
Christian Hohnstaedt
5383c8c43f Consolidate export dialogs 2010-08-07 13:40:25 +02:00
Christian Hohnstaedt
fd776644ac improve error messages 2010-07-24 22:17:52 +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
ac371b697a improve date and time input
- Only once set notBefore to "now" when creating Cert-renewal
  or NewCert dialog.

- Apply-time button now always uses the current value from notBefore
  and adds the time-span without resetting notBefore

- Checking "midnight" now immediately modifies the dates.
  Unchecking "midnight" now recovers the old value

- The seconds are always set to 00, since they can't be set via
  the DateTime dialog anyway

- CRL generation now too allows to use midnight and time ranges
  and uses GENERALIZED time if the date is out of range for UTCTIME
  (same logic as for certificates)
2010-07-14 20:54:59 +02:00
Christian Hohnstaedt
8530a60554 support cross-compiling XCA for MAC OSX 2010-06-17 15:16:30 +02:00
Christian Hohnstaedt
da21e60242 Fix Registry-key retrieval 2010-06-13 11:50:39 +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
8688365e33 minor improvements 2010-03-27 13:04:27 +01:00
Christian Hohnstaedt
984798659c add DH param generation 2010-03-24 08:08:18 +01: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
5de683d402 make mac build 2010-03-04 20:47:42 +01:00
Christian Hohnstaedt
345cdc1083 improve messages and usability
- update german translation
2010-02-21 16:24:00 +01:00
Christian Hohnstaedt
6aacdb121b fix non-ascii PKCS#12 friendly name
- it is two-times utf8-encoded
2010-02-18 07:18:17 +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
766648be49 fix string conversion from QString to ASN1
Synopsis: When using special chars in the DN entries
           they sometimes got corrupted.

 - the toUtf8() method returned a temporary QByteArray
   and the pointer to its memory became invalid befor using it.

 - also checked other invalid uses of temporary QByteArray objects
2010-01-05 07:37:38 +01:00
Christian Hohnstaedt
9ba0dcfa89 fixes for MAC OSX SnowLeopard
from Boudewijn Rempt
2010-01-05 07:37:27 +01:00
Christian Hohnstaedt
232100eec7 fix BMPSTRING decoding 2009-12-09 08:18:58 +01:00
Christian Hohnstaedt
dbad217a9f improve file-dialog handling
- resize columns to fit to the longest entry
 - Ask once if an existing file shall be overwritten
2009-12-06 16:39:17 +01:00
Christian Hohnstaedt
ca69e1e882 fix filename handling 2009-12-05 19:09:47 +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
bd90901c10 change filename handling to support UTF8 names 2009-11-24 19:16:25 +01:00
Christian Hohnstaedt
44e17ae9da minor fixes:
- remove debugging code
 - allow DOCDIR to be different from PREFIX
2009-11-24 17:41:57 +01:00
Christian Hohnstaedt
dcf0c83b35 support smart card import
- import keys and certificates from a smart card and
   show them in an importMulti dialog
 - support exporting the public from smart card
2009-10-29 18:54:08 +01:00
Christian Hohnstaedt
de7165b5d8 add fix file-extension when creating databases on Linux, too
fix typo in changelog
2009-09-17 07:59:22 +02:00
Christian Hohnstaedt
717ec4702c fix date settings in Certificate renewal dialog
- lib/func.cpp just indentation
 - set the default to 1 year and apply it.
2008-03-03 10:11:49 +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
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
cab27442ce whitespace correction 2007-05-23 23:24:31 +02:00
Christian
c94d0667a2 minor changes for W32 2007-04-30 10:51:59 +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
d4a90be207 replace "include <Qt/" by "include <" 2007-04-11 11:19:22 +02:00
Christian
09c67acafe set default xca dir to "My Documents" folder.
Add Registry entries for .xca .crl .crt .pfx
2007-02-07 21:18:27 +01:00
Christian
8427a6e6fb add clicklabel-support for CRLs
fix possible segfault for uninitialized database password
2007-01-31 00:02:37 +01:00
Christian
6a46213230 Changes for w32 2006-12-27 17:57:55 +01:00
Christian Hohnstaedt
2d5e535111 merge suggestions from Alon Bar-Lev, member of Gentoo project 2006-12-06 10:50:35 +01:00
Christian
dfd530a690 add fix for database shrink,
fix URL of documentation
add file associations for *.xdb in the nsi installer
2006-12-05 11:36:41 +01:00
Christian Hohnstaedt
79ea230118 Use special dir for database 2006-12-01 14:19:01 +01:00
Christian Hohnstaedt
9a6a1169b6 replace spaces by underscores for filenames
remove the whole baseDir thing, needed for Berkeley DB
minor fixes and cleanup
don't install the *.png on windows
2006-11-23 18:18:34 +01:00
Christian
ac6e679f5e use resource management for images
modify configure for cygwin
extend w332 installation
2006-11-19 18:57:23 +01:00
Christian
813e115b8e Spaces deleted 2006-05-21 10:08:39 +02:00
chris2511
9773c7b36d more for QT4 2006-04-24 05:08:49 +00:00
chris2511
f8846363c6 Extension editor adopted 2006-03-14 22:54:01 +00:00
chris2511
c6622680db push forward to QT4 2006-03-12 17:39:52 +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
621b27d4eb *** empty log message *** 2004-04-14 14:43:03 +00:00
chris2511
ecf3c16e84 function to apply a time diff extracted to func.cpp 2004-04-13 23:46:23 +00:00
chris2511
11868911ec replace iostream with printf 2003-12-08 23:33:22 +00:00
chris2511
94f37c622c information about -b for basedir,
changes for Mingw32 and MSVC++
2003-12-04 22:17:20 +00:00
chris2511
d4f6c1b9da support for other compiled in basedir
on unix
2003-12-01 16:44:04 +00:00