Vitaly Chikunov [Sun, 5 Jan 2020 20:24:50 +0000 (23:24 +0300)]
travis-ci: Fix quietness of building of openssl
No need for `build.log' as `make -s' will output any failure.
Also, redirection was broken anyway since splitting make into two makes
with separate `-j' and install phase.
Add `travis_wait' to make traves not time-out on slow arches. Reference:
https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
Fixes: c38ec7587 ("travis: speed up Travis build")
Vitaly Chikunov [Sun, 5 Jan 2020 20:51:09 +0000 (23:51 +0300)]
tcl_tests: Abbreviate output when run under CI
To make CI output not too long - output only header of every test set
and output only relevant log entries on test failures.
When `CI' env is defined. Which should be defined for both Travis and
Cirrus. Reference:
https://docs.travis-ci.com/user/environment-variables/
https://cirrus-ci.org/guide/writing-tasks/#environment-variables
Vitaly Chikunov [Sun, 5 Jan 2020 20:14:29 +0000 (23:14 +0300)]
tcl_tests: Rearrange runtest.sh to run from dirrerent env
Add more debug output to fix Travis-CI issues. Move definition of
OPENSSL_CONF above first tcl test run. Define OPENSSL_ENGINES from
ENGINE_DIR by default.
Vitaly Chikunov [Wed, 13 Nov 2019 21:40:18 +0000 (00:40 +0300)]
tcl_tests: Fix and update enc test
- Set expected default value for CRYPT_PARAMS.
- Disable `RIC 1' params tests.
- Disable `Magma-ACPKM' test.
- Update test descriptions to include cipher name.
Vitaly Chikunov [Sun, 10 Nov 2019 01:34:01 +0000 (04:34 +0300)]
tcl_tests: Make utf-8 encoding work
- Remove emacs coding: cp1251 tag
- Change stats file encoding to utf-8
- Change packages source to have -encoding utf-8
- Run tclsh with -encoding utf-8
- Make `proc rus' noop.
This will make Tcl automatically translate scripts output from utf-8 to
system encoding.
ameth: fill digestParamSet for the sake of backwards compatibility
Even though it is not recommended by R 1323565.1.023-2018 fill
digestParamSet field for 512-bit curves Test, TC26-A, TC26-B because old
cryptoproviders expect this field to be present.
Vitaly Chikunov [Tue, 15 Oct 2019 16:22:45 +0000 (19:22 +0300)]
gost_ec_keyx: Fix CID 253282 Dereference null return value
`param' is used unconditionally in pkey_GOST_ECcp_encrypt() so we can
unconditionally check (vs in any particular `if' branch) for it's being
non-NULL. This is similar to how pkey_GOST_ECcp_decrypt() works with
`param'.
Richard Levitte [Wed, 4 Sep 2019 14:22:26 +0000 (16:22 +0200)]
For Grasshopper OMAC_ACPKM, OMAC and MAGMA, support XOF
XOF (eXtendable-Output Function) is supported in OpenSSL since version
1.1.1. Unfortunately, that support is limited, as it requires calling
EVP_DigestFinalXOF(). However, the grasshopper code wasn't compatible.
This changeset adds XOF support in grasshopper
This changeset removes the _meth_ calls from test_grasshopper.c (they
should never have been there, but considering support for XOF came so
late in OpenSSL, their presence is understandable) and uses supported
functionality for this sort of thing instead.
Richard Levitte [Wed, 28 Aug 2019 08:23:57 +0000 (10:23 +0200)]
test/*.t: Don't check OPENSSL_ENGINES
It's set correctly when these tests are started with ctest, and
otherwise, we leave it to the user to decide. Either way, we set it
to a bogus value when it isn't previously set...
Richard Levitte [Sat, 24 Aug 2019 08:36:39 +0000 (10:36 +0200)]
test/run_tests: Always set paths when OPENSSL_ROOT_DIR is defined
When the environment variable OPENSSL_ROOT_DIR is defined, we need to
ensure that PATH and LD_LIBRARY_PATH are properly affected.
This is a little bit complicated, since OPENSSL_ROOT_DIR could point
at an OpenSSL build directory as well as an OpenSSL installation
tree. Fortunately, it's easy to detect the difference; if it's a
build tree, there's a sub-directory 'apps'.
For installation trees, it's further complicated by OpenSSL's
'multilib' target attribute, which exists for platforms that support
directory separated libraries for differing bitness (typically 32-bit
and 64-bit libraries). We trust pkg-config to give us the answer.
Binaries are easier, they live in $OPENSL_ROOT_DIR/bin.
Richard Levitte [Fri, 23 Aug 2019 16:55:42 +0000 (18:55 +0200)]
gost_pmeth.c: mitigate for constness difference in copy function
The second argument for the pkey_copy function has been constified in
OpenSSL to be 3.0. This is normally not a problem, but when passing a
pointer to such a function, the compiler does complain.
This change solves the issue by looking at the macros
OPENSSL_VERSION_MAJOR, which is new in OpenSSL to be 3.0, and set
constness based on that.
Some architectures in some circumstances do not allow unaligned
memory access (such as ARM, MIPS) triggering SIGBUS. This patch
very crudely fixes this issue.
The issue is found and original fix is proposed by Eric Biggers: