2256 Commits

Author SHA1 Message Date
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
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
4efa158c31 Improve documentation v2.1.2 2016-09-19 10:47:25 +05:00
Ivan Romanov
fdf961cfa3 Require CMake 3.0 on Mac OS X 2016-08-26 08:53:37 +05:00
Raphael Kubo da Costa
84f53aea25 qca-ossl: Remove SHA0 from all_hash_types() when it is not available.
Commit 0dbed8e ("qca-ossl: Fix build without support for SHA-0") forgot
to add an #ifdef check for SHA0 support in all_hash_types().

REVIEW: 128700
2016-08-18 08:52:57 +02:00
Ivan Romanov
6a685d6b0b Refactor cipherunittest 2016-08-09 11:26:47 +05:00
Ivan Romanov
759ff45dba Fix indents in cipherunittest 2016-08-09 10:48:36 +05:00
Rolf Eike Beer
eb5eeca609 fix the mkspecs install directory when cross-compiling using Qt5
REVIEW:128308
2016-07-02 19:05:19 +02:00
Rolf Eike Beer
601fd3a051 fix base64 decoding on ARM
This code was broken on ARM and other architectures where "char" is unsigned by
default.

First, it breaks with newer compilers with errors like:

  .../src/qca_textfilter.cpp:314:2: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]

Second, if the compiler would just allow this conversion then the unsigned char
would hold 255, which would not be sign extended when cast to an int later, so
all the checks "< 0" will never trigger, and so invalid input characters cannot
be detected.

REVIEW:128295
BUG:364495
2016-06-27 18:24:02 +02:00
Ivan Romanov
a0c9a28728 Fix imported target name 2016-05-27 15:52:47 +05:00
Ivan Romanov
9e4bf79543 Fix install framework 2016-05-27 15:41:25 +05:00
Patrizio Bekerle
583d450885 fixed a typo 2016-03-17 11:03:42 +01:00
Samuel Gaist
f223ce03d4 OS X build and warning fix
The cmake find file was missing, but CoreFoundation being a system
framework, no need to search for it.

Update code to not use deprecated functions/data structure

CSSM_DATA and SecCertificateGetData have been deprecated since 10.7.
This patch uses SecCertificateCopyData which is the official
replacement.

Reviewed at https://git.reviewboard.kde.org/r/125800/
2015-12-08 21:32:39 +01:00
Rex Dieter
1ff36f4030 use _DEFAULT_SOURCE instead of _BSD_SOURCE
the former is used in other kde software in general, and
the latter is generally deprecated on modern glibc's
2015-11-19 13:23:16 -06:00
Ivan Romanov
4c9f27270e Add missed file
This file must be a part of 4fd11c444a51e8d317b0d68c7b90a8e0f2c6af9f
commit.

REVIEW: 121703
2015-11-18 23:54:14 +05:00
Ivan Romanov
69d8e070f0 Delete dead variable
className is not used. Furthemore it leads to possible crash when no _instance.
2015-11-11 12:35:10 +05:00
Ivan Romanov
da14be6f1b Fix empty strings in pluginPaths
Empty strings lead to strange behaviour and crashes.
2015-11-11 01:54:33 +05:00
Ivan Romanov
558f819819 gnupg: use utf-8 for keys output 2015-10-29 10:52:11 +05:00
Ivan Romanov
bf61f35cb4 gnupg: fixed keys is not updating
On Windows gpg uses ANSI codepage to output homedir and keyrings
paths. No way to output in utf-8. Gpg returns utf-8 strings output
only when --with-colons option is used.
2015-10-29 10:52:11 +05:00
Ivan Romanov
7e4192b70e gnupg: resolve symbolic links
Keyrings watcher can gets paths in any format. To avoid possible
problems try to use unified names for paths.
2015-10-29 10:52:11 +05:00
Ivan Romanov
7a76a9c027 qca-gnupg: default path to keyrings
When no keys 'gpg --list-keys' doesn't return path to keyring file.
Path is needest for watching to know when keys added or removed.
Use default keyrings path based on GnuPG home directory. This
directory gets with output 'gpg --version'. Line which starts with
'Home: ' contains GnuPG home directory. I believe it is correct
for GnuPG always and won't be changed in the future.
2015-10-29 10:52:11 +05:00
Heiko Becker
0dbed8eb38 qca-ossl: Fix build without support for SHA-0
LibreSSL >= 2.3.0 removed support for SHA-0, so there's no EVP_sha
anymore.
Wikipedia says about SHA-0: "160-bit hash function published in 1993
under the name SHA. It was withdrawn shortly after publication due to
an undisclosed "significant flaw" and replaced by the slightly revised
version SHA-1.'

REVIEW: 125387
2015-10-28 22:06:21 +01:00
Heiko Becker
20a587d776 qca-ossl: Fix build without SSLv3
This fixes building with LibreSSL >= 2.3.0 which has removed support
for SSLv3 completely. As far as I know OpenSSL can be configured to
build without it, so it might be helpful there as well.

REVIEW: 125386
2015-10-28 22:05:59 +01:00
Alon Bar-Lev
db17d5969b plugins: qca-logger: README: fix typo
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
2015-10-23 22:32:07 +03:00
Harald Sitter
e44d0a335e bump version to 2.1.1 v2.1.1 2015-10-02 11:35:20 +02:00
Harald Sitter
4f966b0217 Merge branch 'master' into qt5 2015-09-24 10:49:28 +02:00
Jan Grulich
66b9754170 Use Q_SLOTS/Q_SIGNALS instead of slots/signals in all headers from include dir
REVIEW:125289
2015-09-17 16:14:24 +02:00
Harald Sitter
088ff642fc Merge branch 'master' into qt5 2015-04-22 13:07:32 +02:00
Samuel Gaist
4fd11c444a Link against CoreFoundation rather than Carbon
Currently qca links to the Carbon framework for building however the mac
specific code don't use any Carbon classes but CoreFoundation. This patch
aims to update the code and build script to link to the more generic
CoreFoundation framework which may also allow to build it on iOS (not
verified).

REVIEW: 121703
2015-04-22 13:06:26 +02:00
Hrvoje Senjan
cc418554ad Merge remote-tracking branch 'origin/master' into qt5 2015-01-17 20:13:00 +01:00
Hrvoje Senjan
7207e6285e Add missing QIODevice include
Fixes build with Qt 5.5
2015-01-17 20:12:18 +01:00
Raphael Kubo da Costa
d4e9444f9d Do not end Cipher::Mode with a comma.
This solves a build failure with compilers such as GCC 4.2:
/usr/local/include/QtCrypto/qca_basic.h:598: error: comma at end of enumerator list

REVIEW: 122107
2015-01-17 15:21:20 +02:00
Harald Sitter
e40307d108 Merge remote-tracking branch 'origin/master' into qt5 2015-01-15 00:25:32 +01:00
Raphael Kubo da Costa
19aeaedd54 cmake: Make the check for QC_CERTSTORE_PATH actually work.
The previous code (present since the file was created) mixed different
checks that required different expansions:

* `if (ENV{foo})' will always evaluate to false even if $ENV{foo} is
  set, and may even be a CMake bug.
* `if (EXISTS ...)' expects an actual string, not an variable that has
  not been expanded.

It is not clear why the code expects QC_CERTSTORE_PATH to be an
environment variable instead of a regular variable passed to CMake in
the first place, but that can be changed in another commit.

REVIEW: 122062
2015-01-15 00:31:45 +02:00
Harald Sitter
b596e937b8 Revert "Revert "initialize QCA_SUFFIX cache with the possibly previously set SUFFIX""
This reverts commit c9f85b4dcab920d97a0959336ec71bc155209ccf.
2015-01-14 13:51:10 +01:00
Harald Sitter
b7f47694f8 Revert "Revert "properly support co-existing qt4 and qt5 versions""
This reverts commit 99128312fb91bc5f8e6320fe052bbaf7648102fe.
2015-01-14 13:51:07 +01:00
Ivan Romanov
99128312fb Revert "properly support co-existing qt4 and qt5 versions"
It's not properly. Martin Klapetek is not QCA developer. So it's not
correct that he said "Ship it!".

Properly way

cmake -DQCA_SUFFIX=qt5 ...

and in CMakeLists.txt of your project.

find_package(Qca NAMES Qca-qt5)

This reverts commit c32bc6f1bc9befe5f89d3572eb28e0d591a2e3b2.
2015-01-14 15:26:33 +05:00
Ivan Romanov
c9f85b4dca Revert "initialize QCA_SUFFIX cache with the possibly previously set SUFFIX"
I don't agree with this changes see https://git.reviewboard.kde.org/r/121168/
for details.

This reverts commit 3e3533b2753c8e47f0d22b77b564a0a6332cd5b8.
2015-01-14 15:24:11 +05:00
Harald Sitter
3e3533b275 initialize QCA_SUFFIX cache with the possibly previously set SUFFIX
this prevents us from unsetting what was previously set, making sure
the suffix is applied
2015-01-13 17:22:06 +01:00
Harald Sitter
c32bc6f1bc properly support co-existing qt4 and qt5 versions
- if QT4_BUILD is not defined *and* Qt5Core is found build with soname
  qca-qt5
- rename cmake package to reflect the suffix i.e. with a Qt5 build it is
  find_package(Qca-qt5) rather than find_package(Qca)
- the imported cmake target also reflects suffix so "Qca-qt5" is the
  cmake link target for qt5 and "Qca" for qt4 builds

this retains 100% compatibility with regular qca while also offering 100%
coinstallability of the qt5 build.

REVIEW: 121633
2014-12-28 14:26:50 +01:00
Harald Sitter
ffc53703ad put headers of a suffixed build in a suffixed directory
this makes the headers co-installable between a suffixed and regular
version

reviewed as part of r121323
2014-12-22 12:50:18 +01:00
Harald Sitter
4aae2dee34 prevent filewatches from emitting changes when there is no file
(this also fixes the flaky filewatch test that would fail for example on
 ubuntu launchpad builds)

it can happen that (supposedly for filesystem reasons) there are two
changes signals arriving in the watcher code, by the time the first arrives
the file would however already be deleted, by the time the second arrives
it would thus notify of changes to a file that does not exist which is
silly and causes problems with the filewatchtest as it uses signal emission
counting to verify the behavior.
to prevent this problem from popping up there is an additional save guard
in the file_changed slot that will ignore a change if the path in question
doesn't exist AND there is no file being watched by the watcher.

REVIEW: 121588
2014-12-19 16:47:40 +01:00
Harald Sitter
3b1bb19c7c add a reviewboardrc
REVIEW: 121325
2014-12-18 12:27:04 +01:00
Ivan Romanov
e57f8e7795 fixed array size checking
BUG: 341827
2014-12-13 01:54:53 +05:00
Harald Sitter
a67d31b1ec move QCA_CONFIG_NAME_BASE definition in the regular suffix if
(reviewed as part of r121323)
2014-12-02 13:32:09 +01:00
Harald Sitter
02be30908f fix library name in prf file to use the lib name variable
the lib name might be suffixed

(reviewed as part of r121323)
2014-12-02 13:29:52 +01:00
Ivan Romanov
9a9c16dfd1 cmake: fixed cmake config module when used QCA_SUFFIX 2014-11-29 00:57:31 +05:00
Ivan Romanov
98be0a1234 docs: fixed no images in docs when build out of source 2014-11-28 23:50:13 +05:00
Ivan Romanov
95223e9ee3 cmake: fixed warnings on android
do not use -Wcast-align on arm
2014-11-27 01:57:24 +05:00