2407 Commits

Author SHA1 Message Date
Albert Astals Cid
694abbcafa kdfunittest: Test all the backends
and be less verbose when a backend doesn't support what we're testing,
it's fine if the some other one does
2020-01-20 01:01:02 +01:00
Albert Astals Cid
5105fc4981 botan: Make sure it supports pbkdf1(md2) before saying we to
At least my version (2.13.0) doesn't seem to support it

"Fixes" kdfunittest
2020-01-20 00:46:41 +01:00
Albert Astals Cid
b9d80939c6 botan: Fix crash if asking for something botan doesn't provide
Fixes crash in KDFUnitTest with my botan installation
2020-01-19 22:32:32 +01:00
Albert Astals Cid
1b061d63a8 gpg: use the loopback pinentry
otherwise we don't get asked back for passphrase like we want to
2020-01-19 22:17:53 +01:00
Albert Astals Cid
8adde8d9c7 Add file i forgot to commit, sorry ^_^ 2020-01-19 22:16:08 +01:00
Albert Astals Cid
a0194d7ffd qFind -> std::find 2020-01-19 18:01:15 +01:00
Albert Astals Cid
ba3fb44b49 qVariantSetValue -> QVariant::setValue 2020-01-19 17:59:03 +01:00
Albert Astals Cid
70406170f5 Cleanup Qt version checks 2020-01-19 17:57:35 +01:00
Albert Astals Cid
4ad7e911d9 QString::sprintf -> QString::asprintf 2020-01-19 17:45:25 +01:00
Albert Astals Cid
0816a04f42 qSort -> std::sort 2020-01-19 17:35:06 +01:00
Albert Astals Cid
83c23c7a3a QTime -> QElapsedTimer 2020-01-19 17:32:15 +01:00
Albert Astals Cid
d71f4c279b Drop Qt4 support 2020-01-19 17:19:23 +01:00
Albert Astals Cid
3293100c42 remove slot that was declared but never implemented 2020-01-19 17:01:19 +01:00
Albert Astals Cid
00d311d90f Add override 2020-01-19 16:28:44 +01:00
Albert Astals Cid
326399794e qca-botan: Don't crash if BotanCipherContext fails
Makes the cipher unit test at least not crash (even if it doesn't pass)
2020-01-19 16:27:09 +01:00
Albert Astals Cid
691395e193 BigInteger: Test the toArray/fromArray 2020-01-19 12:16:37 +01:00
Nicolas Fella
c167627675 Don't use obsolete qVariantFromValue
Test Plan: Same tests as before pass

Reviewers: iromanov, sitter, dfaure, #frameworks

Reviewed By: sitter

Differential Revision: https://phabricator.kde.org/D25802
2019-12-07 23:27:42 +01:00
Harald Sitter
4b11437f7a change the android condition to a getuid check
it's unclear if anyone would ever run a qca app as root on android, but
in case they do we'd still want to drop

discussed in D23289
2019-09-07 17:26:31 +02:00
Peter Petrik
2895ca34dd Fix QCA android build
Summary:
to be able to run Input App (Android), we have to avoid calls to setuid. Otherwise the application coredumps on this call during runtime.

see https://github.com/lutraconsulting/input-sdk/blob/master/android/recipes/qca/recipe.sh

Reviewers: sitter, dfaure

Reviewed By: sitter

Differential Revision: https://phabricator.kde.org/D23289
2019-09-07 17:26:28 +02:00
R.J.V. Bertin
0be2a2ced3 Call cmake_minimum_required() before project()
Also correct a typo.

Differential revision: https://phabricator.kde.org/D8510
2019-06-08 17:20:00 +02:00
R.J.V. Bertin
b614cdbd6e also set the INSTALL_NAME_DIR for regular Mac libs
Failing to do so can cause linker/loader failures when installing
the QCA library to a non-standard location (e.g. the Qt install tree).
2019-06-08 16:18:03 +02:00
Harald Sitter
db5f82be2a bump version to 2.2.1 v2.2.1 2019-04-23 14:04:15 +02:00
Harald Sitter
b38e904a4e Partially revert "Require CMake 3.4 and use the OpenSSL imported libs"
Summary:
This reverts the QcaMacro changes of
commit 1137ed5f07d137296874f7dd1ee629f903507161 as they seem fairly
unrelated to the actual openssl change and proof to cause persistent issues
with buildability.

Further revert "unbreak build by moving away from deprecated exec_program"
This reverts commit 32419c899c77b8f5ece374d2453ee37e89af7c10.
Which was done in an attempt to remidy the build problems.

Further revert "Actually abort after the message that tells people to set CMAKE_INSTALL_PREFIX"
This reverts commit 63fd27fbce780bccb9c9b3ff6649888cfd809c6a.
Which was also done in an attempt to fix the problems.

BUG: 406353

Test Plan:
- when configuring without any arguments the qmake derived paths are used and correct
- when configuring with CMAKE_INSTALL_PREFIX the paths are accordingly reported below that

QCA prefix is /opt
Plugins will be installed to /opt/lib/qca-qt5
Binary will be installed to /opt/bin
Library will be installed to /opt/lib
Public headers will be installed to /opt/include/Qca-qt5
Private headers will be installed to /opt/include/Qca-qt5
Feature file will be installed to /opt/mkspecs/features
Documentation will be installed to /opt/share/doc/qca-qt5/html
Man page will be installed to /opt/share/man
Pkg-config file will be installed to /opt/lib/pkgconfig

Reviewers: dfaure, arojas, vonreth

Reviewed By: dfaure, arojas

Differential Revision: https://phabricator.kde.org/D20408
2019-04-23 14:03:50 +02:00
Harald Sitter
32419c899c unbreak build by moving away from deprecated exec_program
Summary:
since 1137ed5f07d137296874f7dd1ee629f903507161 which bumped cmake and
started using TARGET_FILE for the qmake calls qca failed to build for me.
I fail to understand why exactly that is but I suspect it has to do with
the fact that exec_program is deprecated and may not be working
(correctly?) with generator expressions.

moving to the not deprecated execute_process fixes clean builds on my
system and is at the very least a move away from deprecated tech with
no downsides

Test Plan: rm -rf * && cmake -DCMAKE_INSTALL_PREFIX=/usr ..

Reviewers: asturmlechner, dfaure, vonreth

Reviewed By: dfaure

Differential Revision: https://phabricator.kde.org/D20228
v2.2.0
2019-04-08 11:32:48 +02:00
David Faure
63fd27fbce Actually abort after the message that tells people to set CMAKE_INSTALL_PREFIX
Test Plan:
`mkdir build ; cd build ; cmake ..` no longer prints out weird stuff after
the "!!!!" error message, it actually stops there as intended (AFAICS).
2019-03-29 09:17:38 +01:00
David Faure
7b03a01b18 Fix compilation error due to QByteArray/QString mixup
main.cpp:4251:35: error: no matching function for call to ‘QByteArray::indexOf(QString&)’
2019-03-17 00:09:21 +01:00
Hannah von Reth
1137ed5f07 Require CMake 3.4 and use the OpenSSL imported libs
Summary:
Fixes
 00:09:45.140 [162/278] Linking CXX shared module lib/qca-qt5/crypto/libqca-ossl.dylib
00:09:45.140 FAILED: lib/qca-qt5/crypto/libqca-ossl.dylib
00:09:45.140 : && /usr/bin/clang++ -O2 -g -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -bundle -Wl,-headerpad_max_install_names  -o lib/qca-qt5/crypto/libqca-ossl.dylib plugins/qca-ossl/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o  lib/qca-qt5.framework/Versions/2.2.0/qca-qt5 /Users/packaging/Craft/BinaryCache/macos-64-clang/lib/libssl.dylib /Users/packaging/Craft/BinaryCache/macos-64-clang/lib/libcrypto.dylib -lcrypto /Users/packaging/Craft/BinaryCache/macos-64-clang/lib/QtCore.framework/QtCore -framework CoreFoundation -framework Security && :
00:09:45.140 ld: library not found for -lcrypto
00:09:45.140 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Reviewers: dfaure, bcooksley, volkov

Reviewed By: dfaure

Differential Revision: https://phabricator.kde.org/D17913
2019-03-04 12:16:36 +01:00
Alexander Volkov
32343842d3 Fix build with botan < 2 and openssl < 1.1
Summary:
This commit amends f57d661416ecbdfbf9c16d8116c296cfdcbeb7d6.
HKDF support was added only in the new versions of the libs.

Reviewers: dfaure, bcooksley

Reviewed By: dfaure

Differential Revision: https://phabricator.kde.org/D16248
2018-10-17 14:54:34 +03:00
Nicolás Alvarez
ad50594cb2 Fix repeated 'the the' in comments. 2018-10-15 10:26:08 -03:00
Alexander Volkov
f57d661416 Introduce HKDF
Summary:
It's needed for implementation of Secret Service:
https://specifications.freedesktop.org/secret-service/ch07s03.html

Reviewers: iromanov, sitter, #frameworks, dfaure

Reviewed By: dfaure

Subscribers: dfaure

Differential Revision: https://phabricator.kde.org/D15510
2018-10-15 14:30:05 +03:00
Alexander Volkov
98eead0058 Add .arcconfig 2018-09-14 19:20:10 +03:00
Harald Sitter
da4d1d06d4 Openssl fix deprecation warnings
Summary:
Openssl fix deprecation warnings

Removed unused function: X509_SIG_getm

deprecated warnings for:
ASN1_STRING_data
DSA_generate_parameters
RSA_generate_key
RAND_pseudo_bytes

Tested with openssl-1.0.2l on ubuntu:14.04
Deprecation warning spotted with openssl-1.1.0.g-1

one deprecation warning left: TLSv1_client_method

Reviewers: sitter, fvogt

Reviewed By: fvogt

Differential Revision: https://phabricator.kde.org/D11616
2018-06-19 11:46:09 +02:00
Andreas Sturmlechner
e854f357f4 Make Qt5Network conditional on BUILD_TESTS
Summary: I did not find it in use somewhere else.

Reviewers: iromanov, sitter, rjvbb

Reviewed By: rjvbb

Subscribers: fvogt

Differential Revision: https://phabricator.kde.org/D12129
2018-06-06 11:21:17 +02:00
Antonio Rojas
78503bf574 Recommit botan 2 support without making botan mandatory
Differential Revision: https://phabricator.kde.org/D11997
2018-04-12 10:03:12 +02:00
Ben Cooksley
01cbb31770 Revert "Add botan 2 support"
This change adds a mandatory dependency on Botan, which is not available at this time within Craft.
As this change was not notified to Sysadmin and because it has left us in a state whereby we are unable to get the Windows CI system back up and running, this is being reverted so it can be brought back online.

Please reintroduce this change once support for having Botan as optional is restored

This reverts commit 47163784d74232e3a844fc42897bffc7eff817b4.
2018-04-12 19:48:32 +12:00
Antonio Rojas
47163784d7 Add botan 2 support
Botan 1.10 will be EOL'd this year. This patch is a rough port to botan 2 API. Also:

- Removes support for botan < 1.10 to simplify code (1.10 was released 7 years ago)
- Ports the cmake module to use pkgconfig, since botan-config doesn't exist anymore in v2.
- To minimize ifdef'd code, botan2 unique_ptr's are release'd
- Removes -ansi C(XX)FLAGS, botan 2 requires C++11

Differential Revision: https://phabricator.kde.org/D11997
2018-04-11 21:43:57 +02:00
Harald Sitter
3e6a86b6b8 Merge branch 'v2.1' 2018-03-22 12:16:44 +01:00
Harald Sitter
b1abd13319 Qca: fix cypto.prf on MacOs
Summary: Fixed crypto.prf for frameworks build with qt5

Reviewers: iromanov, sitter, rjvbb

Reviewed By: sitter, rjvbb

Differential Revision: https://phabricator.kde.org/D11480
2018-03-22 12:15:57 +01:00
Harald Sitter
ee536fd995 Merge remote-tracking branch 'origin/v2.1' 2018-03-22 12:02:31 +01:00
Fabian Vogt
d58e20ee65 Add support for OpenSSL 1.1.0
Test Plan:
Ran the testsuite with OpenSSL 1.1.0g and 1.0.2j, all passed.
Using this code with kdeconnect and okteta successfully on my system now.

Reviewers: iromanov

Subscribers: anthonyfieroni, alonbl, heikobecker, cfeck, asturmlechner, bero, rdieter

Differential Revision: https://phabricator.kde.org/D9416
2018-01-04 20:02:38 +01:00
Ivan Romanov
159e144abf Disable missed openssl cipher suites
Fedora 26 has no them.
2017-09-30 15:45:59 +05:00
Ivan Romanov
8871dcd2e1 Fix CMake warning
CMP 0020 is deprecated. Avoid using of old behaviour.
2017-09-18 22:28:00 +05:00
Ivan Romanov
df794c0181 Remove deprecated keyword 2017-07-08 09:53:45 +05:00
Alon Bar-Lev
5f18ebc705 build: fix C++11 throwing distructors
For >=C++11, explicitly mark throwing destructors `noexcept(false)`

Thanks: Peter-Levine <plevine457@gmail.com>
2017-03-21 12:34:29 +02:00
Ivan Romanov
be55b9c98d Fix Qt5.7 warning 2017-03-01 13:22:48 +05:00
Ivan Romanov
aec63cd2e6 Bump version to 2.1.3 v2.1.3 2017-02-06 17:29:44 +05:00
Ivan Romanov
89800d4341 tlsunittest: disable some ciphers 2017-02-06 17:29:01 +05:00
Ivan Romanov
f4b2eb0ced Fix previous commit 2017-01-29 15:20:17 +05:00
Ivan Romanov
b435c1b87b Avoid @rpath on Mac OS 2017-01-29 14:06:08 +05:00
Samuel Gaist
7ba0ee591e OS X build and warning fix
Revert "Add missed file"

This reverts commit 4c9f27270e0a7c00c10cbc56ce5c6842b47e5ab2.

FindCoreFoundation.cmake is not needed since CoreFoundation
is a system framework. Its use has been removed by
commit f223ce03d4b94ffbb093fc8be5adf8d968f54434

Acked by: Ivan Čukić

REVIEW: 126285
2016-10-20 13:34:23 +02:00