[openssl] master update

beldmit at gmail.com beldmit at gmail.com
Sat May 23 19:05:13 UTC 2020


The branch master has been updated
       via  aa2cb51da03bc8fc40d785042b35fe0c253846bf (commit)
      from  712e8debb5b2238450b303acb5f24298382c63a5 (commit)


- Log -----------------------------------------------------------------
commit aa2cb51da03bc8fc40d785042b35fe0c253846bf
Author: Dmitry Belyavskiy <beldmit at gmail.com>
Date:   Mon May 11 17:08:48 2020 +0300

    GOST external tests
    
    [extended tests]
    
    Reviewed-by: Nicola Tuveri <nic.tuv at gmail.com>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/11792)

-----------------------------------------------------------------------

Summary of changes:
 .gitmodules                                        |  5 +++
 .travis.yml                                        |  4 +-
 gost-engine                                        |  1 +
 test/README.external                               | 22 +++++++++++
 ...ernal_pyca.t => 95-test_external_gost_engine.t} | 10 ++---
 .../gost_engine.sh                                 | 45 ++++++++++++++++++++++
 6 files changed, 80 insertions(+), 7 deletions(-)
 create mode 160000 gost-engine
 copy test/recipes/{95-test_external_pyca.t => 95-test_external_gost_engine.t} (67%)
 create mode 100755 test/recipes/95-test_external_gost_engine_data/gost_engine.sh

diff --git a/.gitmodules b/.gitmodules
index af32ea618c..637e7ade7e 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -9,3 +9,8 @@
 [submodule "krb5"]
 	path = krb5
 	url = https://github.com/krb5/krb5
+
+[submodule "gost-engine"]
+	path = gost-engine
+	url = https://github.com/gost-engine/engine
+	update = rebase
diff --git a/.travis.yml b/.travis.yml
index 413d87475f..65cf6b10a9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -93,9 +93,11 @@ jobs:
               apt:
                   packages:
                       - golang-1.10
+                      - cmake
+                      - libtest2-suite-perl
           compiler: gcc
           # External test pyca-cryptography temporarily disabled due to long term travis failures
-          env:  EXTENDED_TEST="yes" CONFIG_OPTS="--debug enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-external-tests enable-buildtest-c++" BORINGSSL_TESTS="yes" CXX="g++" TESTS="test_external_boringssl test_external_krb5"
+          env:  EXTENDED_TEST="yes" CONFIG_OPTS="--debug enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers enable-external-tests enable-buildtest-c++" BORINGSSL_TESTS="yes" CXX="g++" TESTS="test_external_boringssl test_external_krb5 test_external_gost_engine"
         - os: linux
           compiler: clang
           env: EXTENDED_TEST="yes" CONFIG_OPTS="enable-msan disable-afalgeng -Wno-unused-command-line-argument"
diff --git a/gost-engine b/gost-engine
new file mode 160000
index 0000000000..7f055baddc
--- /dev/null
+++ b/gost-engine
@@ -0,0 +1 @@
+Subproject commit 7f055baddc3aa79fc1c2cf22bf5d5750843f5920
diff --git a/test/README.external b/test/README.external
index 2f5423cbc8..8069ce8d00 100644
--- a/test/README.external
+++ b/test/README.external
@@ -134,6 +134,28 @@ of your system.  Certain tests may require more installed packages to run.  No
 tests are expected to fail.
 
 
+GOST engine test suite
+===============
+
+Much like the PYCA/Cryptography test suite, this builds and runs the GOST engine
+tests against the local OpenSSL build.
+
+You will need a git checkout of gost-engine at the top level:
+
+$ git submodule update --init
+
+Then configure/build OpenSSL enabling external tests:
+
+$ ./config shared enable-external-tests
+$ make
+
+GOST engine requires CMake for the build process.
+
+GOST engine tests will then be run as part of the rest of the suite, or can be
+explicitly run (with more debugging):
+
+$ make test VERBOSE=1 TESTS=test_external_gost_engine
+
 Updating test suites
 ====================
 
diff --git a/test/recipes/95-test_external_pyca.t b/test/recipes/95-test_external_gost_engine.t
similarity index 67%
copy from test/recipes/95-test_external_pyca.t
copy to test/recipes/95-test_external_gost_engine.t
index 1eae23557f..e7522e7032 100644
--- a/test/recipes/95-test_external_pyca.t
+++ b/test/recipes/95-test_external_gost_engine.t
@@ -15,14 +15,12 @@ setup("test_external");
 
 plan skip_all => "No external tests in this configuration"
     if disabled("external-tests");
-plan skip_all => "PYCA tests not available on Windows or VMS"
+plan skip_all => "GOST engine tests not available on Windows or VMS"
     if $^O =~ /^(VMS|MSWin32)$/;
-plan skip_all => "PYCA Cryptography not available"
-    if ! -f srctop_file("pyca-cryptography", "setup.py");
-plan skip_all => "PYCA tests only available in a shared build"
+plan skip_all => "GOST engine tests only available in a shared build"
     if disabled("shared");
 
 plan tests => 1;
 
-ok(run(cmd(["sh", data_file("cryptography.sh")])),
-   "running Python Cryptography tests");
+ok(run(cmd(["sh", data_file("gost_engine.sh")])),
+   "running GOST engine tests");
diff --git a/test/recipes/95-test_external_gost_engine_data/gost_engine.sh b/test/recipes/95-test_external_gost_engine_data/gost_engine.sh
new file mode 100755
index 0000000000..498825bad7
--- /dev/null
+++ b/test/recipes/95-test_external_gost_engine_data/gost_engine.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License").  You may not use
+# this file except in compliance with the License.  You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+#
+# OpenSSL external testing using the GOST engine
+#
+set -e
+
+O_EXE=`pwd`/$BLDTOP/apps
+O_BINC=`pwd`/$BLDTOP/include
+O_SINC=`pwd`/$SRCTOP/include
+O_LIB=`pwd`/$BLDTOP
+
+export PATH=$O_EXE:$PATH
+export LD_LIBRARY_PATH=$O_LIB:$LD_LIBRARY_PATH
+export OPENSSL_ROOT_DIR=$O_LIB
+
+# Check/Set openssl version
+OPENSSL_VERSION=`openssl version | cut -f 2 -d ' '`
+
+echo "------------------------------------------------------------------"
+echo "Testing OpenSSL using GOST engine:"
+echo "   CWD:                $PWD"
+echo "   SRCTOP:             $SRCTOP"
+echo "   BLDTOP:             $BLDTOP"
+echo "   OPENSSL_ROOT_DIR:   $OPENSSL_ROOT_DIR"
+echo "   OpenSSL version:    $OPENSSL_VERSION"
+echo "------------------------------------------------------------------"
+
+cd $SRCTOP/gost-engine
+rm -rf build
+mkdir -p build
+cd build
+cmake ..
+make
+CTEST_OUTPUT_ON_FAILURE=1 HARNESS_OSSL_PREFIX='' OPENSSL_ENGINES=$OPENSSL_ROOT_DIR/gost-engine/build/bin make test
+
+exit 0
+


More information about the openssl-commits mailing list