]> git.ipfire.org Git - thirdparty/openssl.git/blob - test/recipes/95-test_external_gost_engine_data/gost_engine.sh
44810b5936e0a8ae0aafa474a40f481ab6a80522
[thirdparty/openssl.git] / test / recipes / 95-test_external_gost_engine_data / gost_engine.sh
1 #!/bin/sh
2 #
3 # Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
4 #
5 # Licensed under the Apache License 2.0 (the "License"). You may not use
6 # this file except in compliance with the License. You can obtain a copy
7 # in the file LICENSE in the source distribution or at
8 # https://www.openssl.org/source/license.html
9
10 #
11 # OpenSSL external testing using the GOST engine
12 #
13 set -e
14
15 PWD="$(pwd)"
16
17 SRCTOP="$(cd $SRCTOP; pwd)"
18 BLDTOP="$(cd $BLDTOP; pwd)"
19
20 if [ "$SRCTOP" != "$BLDTOP" ] ; then
21 echo "Out of tree builds not supported with gost_engine test!"
22 exit 1
23 fi
24
25 O_EXE="$BLDTOP/apps"
26 O_BINC="$BLDTOP/include"
27 O_SINC="$SRCTOP/include"
28 O_LIB="$BLDTOP"
29
30 unset OPENSSL_CONF
31
32 export PATH="$O_EXE:$PATH"
33 export LD_LIBRARY_PATH="$O_LIB:$LD_LIBRARY_PATH"
34 export OPENSSL_ROOT_DIR="$O_LIB"
35
36 # Check/Set openssl version
37 OPENSSL_VERSION=`openssl version | cut -f 2 -d ' '`
38
39 echo "------------------------------------------------------------------"
40 echo "Testing OpenSSL using GOST engine:"
41 echo " CWD: $PWD"
42 echo " SRCTOP: $SRCTOP"
43 echo " BLDTOP: $BLDTOP"
44 echo " OPENSSL_ROOT_DIR: $OPENSSL_ROOT_DIR"
45 echo " OpenSSL version: $OPENSSL_VERSION"
46 echo "------------------------------------------------------------------"
47
48 cmake $SRCTOP/gost-engine -DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR"
49 make
50 export CTEST_OUTPUT_ON_FAILURE=1
51 export HARNESS_OSSL_PREFIX=''
52 export OPENSSL_ENGINES="$PWD/bin"
53 export OPENSSL_APP="$O_EXE/openssl"
54 make test
55 make tcl_tests