2407 Commits

Author SHA1 Message Date
Ivan Romanov
e8050ebbc1 fixed linking on Windows 2014-09-27 01:06:37 +06:00
Ivan Romanov
c00da86463 cmake: don't check for gpg program
gpg program is runtime dependency. Plugin can be built without it.
2014-09-27 00:53:47 +06:00
Ivan Romanov
0ef16c3837 cmake: some fixes with cached and advanced vars 2014-09-26 04:31:30 +06:00
Ivan Romanov
c9576b7c16 fixed compilation warnings on Windows 2014-09-25 15:42:30 +06:00
Ivan Romanov
ac8b8acd37 dropped fixpaths.include
Use qt.conf to set plugin paths for unittests and qcatool in buildtree
2014-09-25 14:27:44 +06:00
Ivan Romanov
3ebc9c14e2 SafeTimer: many fixes
1. SafeTimer now is common and public class. All plugins use this
   implementation.
2. Added debug messages in SafeTimer. Uncomment SAFETIMER_DEBUG to
   enable.
3. TimerFixer skips SafeTimer objects. No need extra fixes for
   SafeTimer. But can be problems with children of SafeTimer I
   believe no such.
2014-09-25 07:26:24 +06:00
Ivan Romanov
3cd0db9841 use native dir separator in diagnostic text 2014-09-24 18:12:03 +06:00
Ivan Romanov
ed4a05f674 qcatool: use native dir separators for output on console 2014-09-24 18:03:37 +06:00
Ivan Romanov
4b8e2214cd added new functiion pluginPaths
Retrieve plugin paths. It consists of:
1. QCA_PLUGIN_PATH environment if set.
2. QCoreApplication::libraryPaths() .
3. Directory where plugins were installed.

QCA_PLUGIN_PATH is paths list like PATH or QT_PLUGIN_PATH.
It uses system path separator. ";" on Windows and ":" on Unix.

Also qcatool now uses this function.
2014-09-24 17:47:35 +06:00
Ivan Romanov
192243d4bd cmake: fixed QCA_PLUGINS_INSTALL_DIR meaning
Plugins must be in crypto subdir. It is used internally in providers
finding algorythm. So now QCA_PLUGINS_INSTALL_DIR it is path to
crypto directory.
2014-09-24 16:00:39 +06:00
Ivan Romanov
2950458c77 qcatool: prevent crash when only options on command line without any commands 2014-09-23 18:32:25 +06:00
Ivan Romanov
2cdd6c4bd1 tlsunittest: disable more ciphers 2014-09-20 01:02:52 +06:00
Ivan Romanov
a8a26e0bf7 pgpunittests: increase timeout for crypting operations 2014-09-20 00:44:51 +06:00
Ivan Romanov
7268472226 pgpunittests: gpg keyring supports writing. See commit b6db383609d6b017dd2b9ae3809fc259c6397501 2014-09-20 00:02:21 +06:00
Ivan Romanov
1f155f4c55 KeyStoreTracker: initialize all data members of inner Item class in constructor 2014-09-19 23:30:50 +06:00
Ivan Romanov
bd0390b11c SafeTimer: new implementation
Old SafeTimer is not safe. QTimer dies when it changes thread. New
SafeTimer uses old-level timers which also sensetive for thread
change events. To handle this is here special trick which ressurect
timer in new thread.
2014-09-19 23:09:01 +06:00
Ivan Romanov
fe4971ccf1 pgpunittest: fixed start from any directory 2014-09-18 23:24:51 +06:00
Ivan Romanov
0e4e55f5bb Synchronizer: fixed new registration of timers
Since Qt 4.5 or 4.6 registerTimer with id argument is wrong. In really
registerTimer always generates new id. And version of the function
with id argument must be protected.

I didn't tested this fix. build.ko will do this for me.
2014-09-18 22:28:46 +06:00
Ivan Romanov
867ae093eb Syncronizer: fixed compilation when defined TIMERFIXER_DEBUG 2014-09-18 22:06:21 +06:00
Sune Vuorela
93f60f1626 Initialize memory is a class.
REVIEW: 120101
2014-09-12 21:58:10 +02:00
Sune Vuorela
a94f59da17 Fix some possible nullpointer dereferences
REVIEW: 120100
2014-09-09 09:20:13 +02:00
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