[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Tue Apr 18 17:10:30 UTC 2017


The branch master has been updated
       via  0fef74486ede58e34eeac2fab38c3f467ea31f95 (commit)
       via  483bc2dcd3b4a33e13f0e71c145af7e453d3af10 (commit)
       via  77edd02f348d6486005f9138d394e38aa2318e30 (commit)
       via  7c82f5673bea290fac52b2d41932f6125f56802c (commit)
      from  800b5dac006344896a3aa947ab13cd9f63e3fc4c (commit)


- Log -----------------------------------------------------------------
commit 0fef74486ede58e34eeac2fab38c3f467ea31f95
Author: Robbie Harwood <rharwood at redhat.com>
Date:   Wed Apr 5 12:54:41 2017 -0400

    [extended tests] Enable krb5 tests in Travis
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2022)

commit 483bc2dcd3b4a33e13f0e71c145af7e453d3af10
Author: Robbie Harwood <rharwood at redhat.com>
Date:   Wed Apr 5 12:50:07 2017 -0400

    Fix formatting of PYCA external test instructions
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2022)

commit 77edd02f348d6486005f9138d394e38aa2318e30
Author: Robbie Harwood <rharwood at redhat.com>
Date:   Wed Apr 5 12:49:27 2017 -0400

    Update external test README for running krb5
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2022)

commit 7c82f5673bea290fac52b2d41932f6125f56802c
Author: Robbie Harwood <rharwood at redhat.com>
Date:   Wed Apr 5 12:40:22 2017 -0400

    Add external krb5 test support
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/2022)

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

Summary of changes:
 .gitmodules                                        |  4 +++
 .travis.yml                                        |  3 ++
 krb5                                               |  1 +
 test/README.external                               | 36 +++++++++++++++++++++-
 ...70-test_recordlen.t => 95-test_external_krb5.t} | 18 ++++++-----
 test/recipes/95-test_external_krb5_data/krb5.sh    | 23 ++++++++++++++
 6 files changed, 77 insertions(+), 8 deletions(-)
 create mode 160000 krb5
 copy test/recipes/{70-test_recordlen.t => 95-test_external_krb5.t} (51%)
 create mode 100755 test/recipes/95-test_external_krb5_data/krb5.sh

diff --git a/.gitmodules b/.gitmodules
index 696fdff..af32ea6 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -5,3 +5,7 @@
 [submodule "pyca.cryptography"]
 	path = pyca-cryptography
 	url = https://github.com/pyca/cryptography.git
+
+[submodule "krb5"]
+	path = krb5
+	url = https://github.com/krb5/krb5
diff --git a/.travis.yml b/.travis.yml
index cb08e40..61a9acc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -196,6 +196,9 @@ script:
               sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install wine;
               export EXE_SHELL="wine" WINEPREFIX=`pwd`;
           fi;
+          if [ -e krb5/src ]; then
+              sudo apt-get -yq install bison dejagnu gettext keyutils ldap-utils libldap2-dev libkeyutils-dev python-cjson python-paste python-pyrad slapd tcl-dev tcsh;
+          fi;
           HARNESS_VERBOSE=yes BORING_RUNNER_DIR=$top/boringssl/ssl/test/runner make test;
       else
           $make build_tests;
diff --git a/krb5 b/krb5
new file mode 160000
index 0000000..b9ad6c4
--- /dev/null
+++ b/krb5
@@ -0,0 +1 @@
+Subproject commit b9ad6c49505c96a088326b62a52568e3484f2168
diff --git a/test/README.external b/test/README.external
index f74b8a7..8eaefd2 100644
--- a/test/README.external
+++ b/test/README.external
@@ -93,8 +93,42 @@ to be installed.
 $ make test VERBOSE=1 TESTS=test_external_pyca
 
 Test failures and suppressions
-==============================
+------------------------------
 
 Some tests target older (<=1.0.2) versions so will not run. Other tests target
 other crypto implementations so are not relevant. Currently no tests fail.
 
+
+krb5 test suite
+===============
+
+Much like the PYCA/Cryptography test suite, this builds and runs the krb5
+tests against the local OpenSSL build.
+
+You will need a git checkout of krb5 at the top level:
+
+$ git clone https://github.com/krb5/krb5
+
+krb5's master has to pass this same CI, but a known-good version is
+krb5-1.15.1-final if you want to be sure.
+
+$ cd krb5
+$ git checkout krb5-1.15.1-final
+$ cd ..
+
+OpenSSL must be built with external tests enabled:
+
+$ ./config enable-external-tests
+$ make
+
+krb5's tests will then be run as part of the rest of the suite, or can be
+explicitly run (with more debugging):
+
+$ VERBOSE=1 make TESTS=test_external_krb5 test
+
+Test failures supressions
+-------------------------
+
+krb5 will automatically adapt its test suite to account for the configuration
+of your system.  Certain tests may require more installed packages to run.  No
+tests are expected to fail.
diff --git a/test/recipes/70-test_recordlen.t b/test/recipes/95-test_external_krb5.t
similarity index 51%
copy from test/recipes/70-test_recordlen.t
copy to test/recipes/95-test_external_krb5.t
index 12647a2..8144003 100644
--- a/test/recipes/70-test_recordlen.t
+++ b/test/recipes/95-test_external_krb5.t
@@ -7,15 +7,19 @@
 # https://www.openssl.org/source/license.html
 
 
+use OpenSSL::Test;
 use OpenSSL::Test::Utils;
-use OpenSSL::Test qw/:DEFAULT srctop_file/;
+use OpenSSL::Test qw/:DEFAULT data_file srctop_file/;
 
-setup("test_recordlen");
-
-plan skip_all => "No TLS/SSL protocols are supported by this OpenSSL build"
-    if alldisabled(grep { $_ ne "ssl3" } available_protocols("tls"));
+setup("test_external_krb5");
 
 plan tests => 1;
 
-ok(run(test(["recordlentest", srctop_file("apps", "server.pem"),
-             srctop_file("apps", "server.pem")])), "running recordlentest");
+SKIP: {
+    skip "No external tests in this configuration"
+        if disabled("external-tests");
+    skip "krb5 not available", 1
+        if ! -f srctop_file("krb5", "README");
+
+    ok(run(cmd([data_file("krb5.sh")])), "running krb5 tests");
+}
diff --git a/test/recipes/95-test_external_krb5_data/krb5.sh b/test/recipes/95-test_external_krb5_data/krb5.sh
new file mode 100755
index 0000000..39c6592
--- /dev/null
+++ b/test/recipes/95-test_external_krb5_data/krb5.sh
@@ -0,0 +1,23 @@
+#!/bin/sh -ex
+#
+# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the OpenSSL license (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
+
+# krb5's test suite clears LD_LIBRARY_PATH
+LDFLAGS="-L`pwd`/$BLDTOP -Wl,-rpath,`pwd`/$BLDTOP"
+CFLAGS="-I`pwd`/$BLDTOP/include -I`pwd`/$SRCTOP/include"
+
+cd $SRCTOP/krb5/src
+autoreconf
+./configure --with-ldap --with-prng-alg=os --enable-pkinit \
+            --with-crypto-impl=openssl --with-tls-impl=openssl \
+            CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
+
+# quiet make so that Travis doesn't overflow
+make -s
+
+make check


More information about the openssl-commits mailing list