2336 Commits

Author SHA1 Message Date
Sune Vuorela
df6e7a2377 Fix qt4 build 2014-09-08 15:41:07 +02:00
Florian Fieber
869b20e64b Add unit tests for expired subkey issue
If a key has a non-related, expired signing subkey, any operation on this key
previously would fail, claiming the key is expired.

REVIEW: 118567
2014-09-08 18:15:20 +06:00
Florian Fieber
2559f1779a Fix operating on keys with unrelated expired subkeys
Ignore KEYEXPIRED which will be thrown for any expired subkey regardless
of being related to the current operation. Instead, use EXPKEYSIG,
REVKEYSIG, EXPSIG and INV_RECP accordingly.

Add new errors QCA::SecureMessage::{ErrorSignerRevoked,
                                    ErrorSignatureExpired,
                                    ErrorEncryptRevoked}.

Due to GnuPG bug #1650 <https://bugs.g10code.com/gnupg/issue1650>
encrypting to an expired or revoked key will omit the reason for failing,
resulting in the error code QCA::SecureMessage::ErrorEncryptInvalid.

REVIEW: 118567
2014-09-08 18:14:40 +06:00
Sune Vuorela
1acc18cf38 Fix a couple of crashes where all plugins might not be available.
REVIEW: 120094
2014-09-08 10:16:57 +02:00
Aleix Pol
1563886480 Clean plugin lookup code
Do the proper query rather than use the default and blindly filter things
out
2014-09-01 17:35:07 +02:00
Ivan Romanov
bfe0784fde cmake: fixed when set empty CMAKE_INSTALL_PREFIX in command line 2014-08-26 16:24:59 +06:00
Ivan Romanov
c30f5d2455 cmake: fixed typo 2014-08-22 21:48:20 +06:00
Ivan Romanov
da1f8190ac cmake: use FindPkcConfig module instead of obsoletes PKGCONFIG 2014-08-21 03:10:34 +06:00
Ivan Romanov
6ee2797689 cmake: fixed paths in qca2.pc
After the latest commit cmake is trying to use relative paths.
But in pc file can be used only absolutes. So it is need to
generate this file before relative paths will be calculated.
2014-08-21 02:04:49 +06:00
Ivan Romanov
c42227f927 cmake: copy images for html docs in build tree 2014-08-12 13:23:28 +06:00
Ivan Romanov
101b99a657 docs: fixed repository place 2014-08-12 13:23:28 +06:00
Ivan Romanov
efd70c659e cmake: rewritten config package
Fixed algorythm to check for relocatable package.
On Windows when installing to Qt5 prefix QCA will not be relocatable.
2014-08-12 13:22:23 +06:00
Ivan Romanov
f3b284f565 cmake: install export targets to lib dir
share/cmake is wrong place for generated cmake files. For such files
should be used lib/cmake dir.

CCMAIL: aleixpol@kde.org
CCMAIL: kde-core-devel@kde.org
CCMAIL: kde-frameworks-devel@kde.org
2014-08-10 16:42:46 +06:00
Ben Cooksley
c8b445b04a Revert "Fix plugins lookup when not building in the Qt prefix"
This reverts commit 38e0665127650b3db5676c1dd5f0ffeb8cdb176f.

This change is incorrect, as Qt/QCA does not look within $pluginDir/qca/crypto when loading it's plugins.
Instead, it expects to find them within the $pluginDir/crypto/ subdirectory which no longer exists with this change.

While the use of lib/qca/ is non-standard for plugins, existing code within the CI scripts is able to handle this abnormality.
Normal Qt libraries which use plugins also function normally on the CI system.

The change as it stands does not work with Qt 4 and breaks all tests which are reliant upon QCA on the CI system.
As it appears a decision needs to be made on where QCA plugins should live and how they should be loaded i'm reverting this change to allow the tests to pass again.

CCMAIL: aleixpol@kde.org
CCMAIL: drizt@land.ru
CCMAIL: stephane@mankowski.fr
CCMAIL: kde-core-devel@kde.org
CCMAIL: kde-frameworks-devel@kde.org
2014-08-10 00:00:35 +12:00
Aleix Pol
38e0665127 Fix plugins lookup when not building in the Qt prefix
QCoreApplication::libraryPaths points to the QT_PLUGIN_PATH, these
usually point to the lib/plugins directory, rather than lib/ itself.
2014-08-01 01:48:23 +02:00
Aleix Pol
55093770df Export QCA targets
Makes it easier to adopt QCA by a cmake project by exporting the targets' include paths with the target.

REVIEW: 119231
2014-07-17 17:03:13 +02:00
Teo Mrnjavac
2c69c724d5 Wrap string literals in QStringLiteral in headers 2014-02-10 18:32:34 +01:00
Ivan Romanov
fbdf57f843 cmake: install .PDB files
On Windows when compiling with Visual Studio will be produced special
.pdb files for debuggins purposes. It must be put next to target
runtime (.dll or .exe) file.
2014-02-03 02:05:54 +06:00
Ivan Romanov
01bf129066 fix previous commit 2014-02-02 02:39:32 +06:00
Ivan Romanov
9504d1c8e0 cmake: put all runtime to bin when compiling
The most it is need for windows where no rpath and all dll's must be
in the same dir (or in PATH environment)
2014-02-02 02:35:55 +06:00
Ivan Romanov
e42df7e95c cmake: use standard BUILD_SHARED_LIBS instead of own SHARED_LIBRARY
BUILD_SHARED_LIBS is internally defined is cmake. So it is a
preferable way to choose shared or static library will be built.
2014-02-01 03:36:57 +06:00
Ivan Romanov
2502aad59d cmake: after compiling put all static libs to lib directory 2014-02-01 03:33:29 +06:00
Ivan Romanov
d9cbbf906d Supress cmake policy warnings on Windows 2014-02-01 01:26:15 +06:00
Ivan Romanov
dc42b9713f fix windows compilation warning
qca_systemstore_win.cpp hasn't Q_OBJECT macro.
It is regular C++ sources file.
2014-02-01 00:53:38 +06:00
Ivan Romanov
a917dc3a93 cipherunittest: check result after finish()
In common case update() function can not returns data.
So it is not a wrong. But after finish() all data must be returned.
2014-01-30 00:47:06 +06:00
Ivan Romanov
b049c59588 qca-botan: fixed getting result size for ciphers
Do not try to guess the result size. It rely with particular
algo and some other factors and so can be any. Just use
Pipe::remaining() for this purpose.
2014-01-30 00:33:50 +06:00
Ivan Romanov
184db75d4b cmake: use QT_HEADER_DIR instead of QT_INCLUDE_DIR
Qt/Mac frameworks has two include dirs.
One is the framework include for which CMake will add a -F flag
and the other is an include dir for non-framework Qt modules.
QT_INCLUDE_DIR contains both.
QT_HEADER_DIR is for non-framework Qt modules.
2014-01-28 17:33:58 +06:00
Ivan Romanov
eb54373946 cmake: use install(FILES ...) instead of old style install_files 2014-01-26 03:32:07 +06:00
Adnan RIHAN
71f932186b Fixed "unused variable" warning in qca-gcrypt plugin 2014-01-22 11:10:19 +01:00
Bartosz Brachaczek
0e2dd07cd1 Remove pointer to deinit() routine from QCoreApplication at deinitialization
REVIEW: 115159
2014-01-21 13:23:11 +06:00
Uwe L. Korn
9537815da5 Declare correct Qt version for pkg-config
REVIEW: 115050
2014-01-17 13:56:50 +06:00
Ivan Romanov
e2ff4f0a61 new cmake option DEVELOPER_MODE
DEVELOPER_MODE is designed for various developer issues. Now this mode
forced to use plugins only from build tree. To avoid excess plugins
from system QCA. Also now not need to set QT_PLUGIN_PATH to use plugins
from QCA build tree.
2014-01-07 04:47:18 +06:00
Ivan Romanov
e5ec390625 fix hardcoded plugins path for unittests 2014-01-07 00:24:49 +06:00
Adnan RIHAN
9e0ddb716d Overloaded "makeKey" to derive a password depending on a time factor
Overloaded "makeKey" in QCA::KeyDerivationFunction + botan/gcrypt/ossl plugins
to allow deriving a master password depending on a time factor in addition to
only giving an arbitrary iteration count.
Deriving with a time delays exhaustive research on master passwords by
increasing the time needed to try each password (the derivation time)
Added corresponding unittests.

REVIEW: 114503
2014-01-06 18:38:21 +01:00
Ivan Romanov
2817b31e06 pgpunittest: copy keys* folders to keys*_work
gpg changes trustdb.gpg. But this file under vcs. So just copy this
file to another folder.
2014-01-06 00:42:44 +06:00
Ivan Romanov
b0c8788d9a tlsunittest: don't check some cipher suites
openssl very configurable. There is no any guarantee that this
or another cipher suite will be in current building. So I just
took that Fedora cipher suites is minimal default list and
I believe that it will be true in every case.
2014-01-05 01:54:18 +06:00
Ivan Romanov
7d7535216a cipherunittest: disable qca-gcrypt for some tests
Seems Cipher support is not finished in qca-gcrypt. When it will be
done need to enable them again.
2014-01-03 22:33:43 +06:00
Ivan Romanov
80048dc7b9 qca-nss: fixed KeyLenght for Cipher
Before was KeyLength(0, 0, 0). Seems it is dummy.
2014-01-03 22:14:14 +06:00
Ivan Romanov
c820094625 filewatchunittest: show 'please wait' message 2014-01-03 19:43:45 +06:00
Ivan Romanov
01e2b1d1cd enabled filewatchunittest
also fixed cmake building of this unittest
2014-01-03 19:34:19 +06:00
Ivan Romanov
6dd10a4e91 Dropped useless script 2014-01-03 19:02:50 +06:00
Ivan Romanov
8098fc925f Added cmake doc target
Do not use doxygen directly. Often cmake build out-of-source.
So it usefult to have doc make target. It is required to generate
documentation for generating header file (qca_version.h) which places
in build tree.
2014-01-03 15:53:19 +06:00
Ivan Romanov
5bfb2dc9bf bump version to 2.1.0 2014-01-03 15:19:40 +06:00
Ivan Romanov
6bf4e5213e Define QCA version only in cmake rules
Added new generated public include qca_version.h.
Also add new version DEFINES
  QCA_MAJOR_VERSION
  QCA_MINOR_VERSION
  QCA_PATCH_VERSION
  QCA_VERSION_STR
  QCA_VERSION_CHECK(major, minor, patch)

and new version functions
  const char *qcaVersionStr()
  int qcaMajorVersion()
  int qcaMinorVersion()
  int qcaPatchVersion()
2014-01-03 14:37:00 +06:00
Bartosz Brachaczek
506d9ef311 Add unloadProvider() function for symmetry with insertProvider()
REVIEW: 114690
2014-01-02 17:23:42 +06:00
Ivan Romanov
6d690c0070 Build static QCA
Added new cmake variable SHARED_LIBRARY. By default is on.
When it is off QCA library, plugins, tools, examples and unittests
will be built as static. Also if is used static Qt plugins will be
built as static. Tested with Qt4.
2014-01-02 03:50:18 +06:00
Ivan Romanov
4edfa3fcba fixed previous commit 2014-01-02 00:02:12 +06:00
Ivan Romanov
1c09b7b8b1 Dropped own FindQt4 cmake module use system one 2014-01-01 22:32:10 +06:00
Ivan Romanov
94ab628411 Added botan-config-1.10 to list possible botan-config names
Such name is used on Fedora 20.
2014-01-01 21:26:43 +06:00
Ivan Romanov
dc5af5c374 fixed mozcerts building rules
Use QCA_SUFFIX when building mozcerts.
Place mozcerts binary in ./bin after linking.
2014-01-01 05:47:55 +06:00