Commit Graph

32 Commits

Author SHA1 Message Date
Fabrice Fontaine
d0339905fc package/cryptopp: disable altivec if needed
Fix the following build failure raised since commit
bf4cf9de83:

blake2s_simd.cpp:715:8: error: 'uint32x4_p' does not name a type; did you mean 'uint32_t'?
  715 | inline uint32x4_p VecLoad32(const T* p)
      |        ^~~~~~~~~~
      |        uint32_t

Fixes:
 - http://autobuild.buildroot.org/results/9e9f8559b12b8e2cf99cfab435fa7dd5796bbcd5

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-13 16:21:03 +01:00
Fabrice Fontaine
403892137c package/cryptopp: needs C++
Fix the following build failure raised since commit
bf4cf9de83:

no -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0 -D_FORTIFY_SOURCE=1 -fPIC -DCRYPTOPP_DISABLE_ARM_NEON -c cryptlib.cpp
make[1]: no: Command not found

Fixes:
 - http://autobuild.buildroot.org/results/fa90b416a219a512a482e7dc63e2d72b184307c7

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2022-02-05 18:26:59 +01:00
Fabrice Fontaine
81945bde7c package/cryptopp: disable neon if needed
Fix the following build failure raised since commit
bf4cf9de83:

In file included from aria_simd.cpp:18:0:
/home/buildroot/autobuild/instance-3/output-1/host/opt/ext-toolchain/lib/gcc/arm-none-linux-gnueabi/4.8.3/include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
 #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
  ^

Fixes:
 - http://autobuild.buildroot.org/results/e4fd947c118174a4fad62cbed18816f02d39ec25

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-11 21:59:27 +01:00
Fabrice Fontaine
7425450ba2 package/cryptopp: needs wchar
Fix the following build failure raised since commit
bf4cf9de83:

In file included from seckey.h:11,
                 from 3way.h:10,
                 from 3way.cpp:5:
misc.h:1528:6: error: 'wstring' in namespace 'std' does not name a type
 1528 | std::wstring StringWiden(const char *str, bool throwOnError = true);
      |      ^~~~~~~
In file included from seckey.h:11,
                 from 3way.h:10,
                 from 3way.cpp:5:
misc.h:14:1: note: 'std::wstring' is defined in header '<string>'; did you forget to '#include <string>'?
   13 | #include "smartptr.h"
  +++ |+#include <string>
   14 | #include "stdcpp.h"

Fixes:
 - http://autobuild.buildroot.org/results/174fe03da7a40dd152703de93af6a213d9cac698

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-11 21:59:22 +01:00
Kamel Bouhara
bf4cf9de83 package/cryptopp: add a target variant
So far, cryptopp only had a host variant, but some use-cases require
this library on the target, so this adjusts the cryptopp package
accordingly.

One patch (submitted upstream) is needed to have the proper symlink
corresponding to the SONAME of the shared library.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-01-07 23:28:05 +01:00
Fabrice Fontaine
d714137722 package/cryptopp: security bump to version 8.6.0
This release clears CVE-2021-40530 and fixes a problem with ChaCha20
AVX2 implementation. The CVE was due to ElGamal encryption using a work
estimate to size encryption exponents instead subgroup order. The
ChaCha20 issue was due to mishandling a carry in the AVX2 code path. The
ChaCha20 issue was difficult to duplicate, so most users should not
experience it.

https://github.com/weidai11/cryptopp/releases/tag/CRYPTOPP_8_6_0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-09-25 16:42:41 +02:00
Fabrice Fontaine
251f3e3a3f package/cryptopp: bump to version 8.5.0
https://www.cryptopp.com/release850.html
https://www.cryptopp.com/release840.html

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-09-19 13:25:28 +02:00
Fabrice Fontaine
3658c1362b package/cryptopp: add CPE variables
cpe:2.3🅰️cryptopp:crypto\+\+ is a valid CPE identifier for this
package:

  https://nvd.nist.gov/products/cpe/search/results?namingFormat=2.3&orderBy=2.3&keyword=cpe%3A2.3%3Aa%3Acryptopp%3Acrypto%5C%2B%5C%2B

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-02-07 10:30:43 +01:00
Fabrice Fontaine
e7c789d48f package/cryptopp: security bump to version 8.3.0
- Fix CVE-2019-14318: Crypto++ 8.2.0 and earlier contains a timing side
  channel in ECDSA signature generation. This allows a local or remote
  attacker, able to measure the duration of hundreds to thousands of
  signing operations, to compute the private key used. The issue occurs
  because scalar multiplication in ecp.cpp (prime field curves, small
  leakage) and algebra.cpp (binary field curves, large leakage) is not
  constant time and leaks the bit length of the scalar among other
  information. For details, see:
  https://github.com/weidai11/cryptopp/issues/869

- Update license hash due to the addition of ARM SHA1 and SHA256 asm
  implementation from Cryptogams
  1a63112faf
  4c9ca6b723

https://www.cryptopp.com/release830.html

[Peter: adjust CVE info, issue is fixes in 8.3.0]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-12-21 10:45:08 +01:00
Peter Seiderer
695f20cd0c package/cryptopp: replace utf-8 space by ascii character
Replace utf-8 NO-BREAK-SPACE (c2 a0) in comment line by simple
ascii space character.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-07 17:02:44 +02:00
Fabrice Fontaine
0a0648226b package/cryptopp: fix build with gcc < 4.9
Fixes:
 - http://autobuild.buildroot.org/results/7e68f32e62c34497848f0f7fc1f12dba67bf44d0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[Arnout: re-order the assignments]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-05-05 22:31:10 +02:00
Fabrice Fontaine
e70c794df1 package/cryptopp: bump to version 8.2.0
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-05 20:00:19 +02:00
Fabrice Fontaine
bd1ba229be package/cryptopp: don't build cryptest.exe
Replace install target by install-lib target to avoid building and
installing cryptest.exe

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-09 21:45:36 +01:00
Fabrice Fontaine
24ff9d2c19 package/cryptopp: bump to version 8.1.0
- Remove patch (already in version)
- Add BSD-3-Clause (CRYPTOGAMS) and Public domain (ChaCha SSE2 and  AVX)
  to LICENSE, see:
  64a89bf352

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-09 14:30:10 +01:00
Peter Korsgaard
4b2fff01c0 package/cryptopp: fix dos/unix newlines in patch
Fixes:
http://autobuild.buildroot.net/results/0a26265961747600388258d32ba7dc9226c9249b/

Commit 40005b9a0d (package/cryptopp: fix build with gcc < 4.9) added a
patch to fix building with old toolchains.  The source code unfortunately
contains a mix of DOS and UNIX newlines, and the DOS new lines got stripped
by the mailing list, causing the patch to no longer apply.

Fix up the patch manually.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-26 14:48:45 +01:00
Fabrice Fontaine
40005b9a0d package/cryptopp: fix build with gcc < 4.9
Disable AVX2 if gcc < 4.9

Fixes:
 - http://autobuild.buildroot.org/results/195e40b34344f773da51a3fbff9d8e76c517eed1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-02-22 22:30:29 +01:00
Fabrice Fontaine
67a7c67508 package/cryptopp: bump to version 8.0.0
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-01-13 21:59:08 +01:00
Carlos Santos
08aa9c9008 package/cryptopp: change site to https to avoid a redirection
Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-13 21:38:41 +01:00
Carlos Santos
ddcf845250 package/cryptopp: purge trailing '/' from CRYPTOPP_SITE
<PKG>_SITE cannot have a trailing slash.

This was not detected by the check in generic-package because it is a
host-only package without Config.in symbol.

Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2018-12-10 22:01:28 +01:00
Fabrice Fontaine
3f12545c11 cryptopp: bump to version 7.0.0
Remove patch (applied upstream)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-09 23:42:28 +02:00
Maxime Hadjinlian
7ce411c452 cryptopp: use HOST_CRYPTOPP_DL_DIR instead of CRYPTOPP_DL_DIR
The infrastructure only provides HOST_CRYPTOPP_DL_DIR, because this
package is host only. Ideally the infra should provide CRYPTOPP_DL_DIR,
but it doesn't currently, and that requires more significant changes.

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-02 20:50:52 +02:00
Maxime Hadjinlian
514291f39e packages: use new $($PKG)_DL_DIR) variable
Instead of DL_DIR, the package should now use $(PKG)_DL_DIR to ease the
transition into a new directory structure for DL_DIR.

This commit has been generated with the following scripts:

for i in $(find . -iname "*.mk"); do
	if ! grep -q "\$(DL_DIR)" ${i}; then
		continue
	fi
	pkg_name="$(basename $(dirname ${i}))"
	[ "${pkg_name}" = "package" ] && continue
	raw_pkg_name=$(echo ${pkg_name} | tr [a-z] [A-Z] | tr '-' '_')
	pkg_dl_dir="${raw_pkg_name}_DL_DIR"
	sed -i "s/\$(DL_DIR)/\$($pkg_dl_dir)/" ${i}
done

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-04-02 15:53:53 +02:00
Fabrice Fontaine
22ee82bb93 cryptopp: fix build with host-gcc 4.7.x
Fixes:
 - http://autobuild.buildroot.org/results/9ab386124e4a09b50598c6f95ad40b25a83d227e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-03-10 20:15:24 +01:00
Fabrice Fontaine
a5750692fe cryptopp: bump to version 6.1.0
Remove patch (applied upstream)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-03-05 21:18:44 +01:00
Arnout Vandecappelle
15bff58f3e generic packages: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix
Remove the redundant usr/ component of the HOST_DIR paths. Since a
previous commit added a symlink from $(HOST_DIR)/usr to $(HOST_DIR),
everything keeps on working.

This is a mechanical change with
git grep -l '\$(HOST_DIR)/usr' | xargs sed -i 's%\(prefix\|PREFIX\)=\("\?\)\$(HOST_DIR)/usr%\1=\2$(HOST_DIR)%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:02 +02:00
Rahul Bedarkar
26a7f80664 package: use SPDX short identifier for Boost Software License 1.0
We want to use SPDX identifier for license string as much as possible.
SPDX short identifier for Boost Software License 1.0 is BSL-1.0.

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-04-01 15:34:46 +02:00
Peter Korsgaard
9f57959147 cryptopp: fixup DOS newlines in CVE-2016-9939 patch
The patch did contain the correct newlines, but they got stripped by
patchwork so now the patch no longer applies.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-29 00:01:54 +01:00
Peter Korsgaard
222808a4b6 cryptopp: add upstream security fix for CVE-2016-9939
Fixes security issue (DoS) in Crypto++ ASN1 decoder:

https://github.com/weidai11/cryptopp/issues/346

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-28 11:18:09 +01:00
Gustavo Zacarias
bb50481b36 cryptopp: use $(HOST_MAKE_ENV) when calling $(MAKE)
Signed-off-by: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-29 15:52:32 +02:00
Thomas Petazzoni
da90437be7 cryptopp: bump to 5.6.5
This commit bumps cryptopp from 5.6.3 to 5.6.5 in order to fix bug

The commit f707b9ef1688d4429ca6239cf2dc236440974681, which Buildroot
was downloading as a patch to fix build with older gcc versions, has
been merged upstream as of 5.6.4, is therefore no longer necessary,
and dropped in this commit.

In addition, Andrey Volkov in the bug report #9321, proposed to add a
number of patches to cryptopp to solve issues when using
tegrarcm. Those patches are the following ones:

 - patch 0: moving to autotools as the build system. This is not
   strictly a bug fix, and is not necessary.

 - patch 1: merged upstream in
   "3941be18891a6a87626b7c70f715ca91c61c08c3 Fixed hang on ARM
   platforms in Integer::DivideThreeWordsByTwo", which is part of
   5.6.5.

 - patch 2: merged upstream in
   "9fca0c28023a177106cf58a3de6da610f185a6e4 Work around issue on
   ARMEL in MultiplyTop and GCC. ARMHF is OK", which is part of 5.6.5.

 - patch 3: merged upstream in
   "dce2317195a7d9aa77b159fd1beddaf8358f6243 Increase range for GCC
   workaround on ARMEL. After speaking with AP from GCC, he states
   some issues are still likely present in Master, which is GCC 6.0",
   which is part of 5.6.5

 - patch 4: merged upstream in
   "605744d8260c6ada033805c13ae0b2646acf18d6 Fixed SecBlock append
   when "this == t", fixed assert, added validation test (Issue 92)",
   which is part of 5.6.5

 - patch 5: merged upstream in
   "9f335d719ebc27f58251559240de0077ec42c583 Fix the Rijndael timing
   attack counter measure", which is part of 5.6.5

 - patch 6: merged upstream in
   "d8b02cfaafd7350ed0f876cd5da405cff330d537 Fixed m68k detection
   (Issue 153)", which is part of 5.6.5

 - patch 7: merged upstream in
   "c82fd655ed7465db8d21a0e0559c304a7a86d298 Cleared assert in debug
   builds (Issue 138)", which is part of 5.6.5

Bottom line: none of the patches proposed by Andrey Volkov are
necessary if we bump to 5.6.5.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-22 22:26:32 +02:00
Julian Scheel
b4ccab9060 package/cryptopp: Backport gcc compatibility patch
Import patch from cryptopp upstream which fixes the gcc version checks
for using attribute deprecated with messages. Fixes build with host
gcc versions < 4.5.

Signed-off-by: Julian Scheel <julian@jusst.de>
[Thomas:
 - directly use the patch from upstream through <pkg>_PATCH rather
   than storing it in package/cryptopp/, as it helps avoiding
   line-endings problems: upstream has the source code with DOS line
   endings.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-28 13:50:03 +02:00
Julian Scheel
615a04b2c3 cryptopp: new package
Signed-off-by: Julian Scheel <julian@jusst.de>
[Thomas:
 - put HOST_CRYPTOPP_EXTRACT_CMDS earlier in the file, since it's what
   gets executed first.
 - fix typo in the name of HOST_CRYPTOPP_MAKE_OPTS
 - pass -fPIC in CXXFLAGS, since we're building a shared library
 - just call "make shared" for the build and "make install" for the
   installation.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-19 21:38:50 +02:00