[openssl] master update

Dr. Paul Dale pauli at openssl.org
Wed Jul 28 00:31:48 UTC 2021


The branch master has been updated
       via  2a7855fb2596048e5038afa5e49a02853297df6d (commit)
       via  1ad435039333a09b31d7c569b822bd5d936b8105 (commit)
       via  cb7055fd5ad9bf5c84d4480b7dbbcfb1cb242fc9 (commit)
       via  64d9b626aae49154bd44edf8fb1a3eca133445a3 (commit)
       via  09755337d5b907565d3b8a9ee8b33a2c60616c0a (commit)
      from  03c2f21b980524dc05a0426146f845ec1e969c2e (commit)


- Log -----------------------------------------------------------------
commit 2a7855fb2596048e5038afa5e49a02853297df6d
Author: Pauli <pauli at openssl.org>
Date:   Mon Jul 26 12:54:50 2021 +1000

    ci: disable async for the SH4 build and reenable the associated test
    
    The platform doesn't seem to have support for this.
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16144)

commit 1ad435039333a09b31d7c569b822bd5d936b8105
Author: Pauli <pauli at openssl.org>
Date:   Mon Jul 26 11:57:48 2021 +1000

    ci: get rid of no-asm flag to m68k cross compiles
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16144)

commit cb7055fd5ad9bf5c84d4480b7dbbcfb1cb242fc9
Author: Pauli <pauli at openssl.org>
Date:   Mon Jul 26 11:54:12 2021 +1000

    ci: add the param conversion tests to the cross compiles.
    
    There was a failure because an "inf" values was being read as a "NaN" not an
    infinity.
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16144)

commit 64d9b626aae49154bd44edf8fb1a3eca133445a3
Author: Pauli <pauli at openssl.org>
Date:   Fri Jul 23 11:48:32 2021 +1000

    QEMU: include test runs for most cross compilation targets
    
    For the cross compiles where the tests couldn't be run, most are capable
    of being run when statically linked.  For these, a shared with FIPS build
    but not test run is also included to maximise compilation coverage.
    The builds take a couple of minutes so the impact of these extra jobs
    isn't great.
    
    The test failures for test_includes, test_store and test_x509_store
    across several platforms are related the the OPENSSL_DIR_read() call.
    This gets a "Value too large for defined data type" error calling the
    standard library's readdir() wrapper.  That is, the failure is during
    the translation from the x86-64 structure to the 32 bit structure.
    I've tried tweaking the include defines to use larger fields but couldn't
    figure out how to make it work.  The most prudent fix is to ignore these
    tests for these platforms.
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16144)

commit 09755337d5b907565d3b8a9ee8b33a2c60616c0a
Author: Pauli <pauli at openssl.org>
Date:   Mon Jul 26 11:53:23 2021 +1000

    test: handle not a number (NaN) values in the param conversion test.
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16144)

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

Summary of changes:
 .github/workflows/cross-compiles.yml | 62 +++++++++++++++++++++++++++++-------
 test/params_conversion_test.c        | 24 ++++++++++++--
 2 files changed, 73 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/cross-compiles.yml b/.github/workflows/cross-compiles.yml
index 6b4505c5db..514a4fbabe 100644
--- a/.github/workflows/cross-compiles.yml
+++ b/.github/workflows/cross-compiles.yml
@@ -14,6 +14,8 @@ jobs:
         #   libs: the Debian package for the necessary link/runtime libraries.
         #   target: the OpenSSL configuration target to use, this is passed
         #           directly to the config command line.
+        #   fips:   set to "no" to disable building FIPS, leave unset to
+        #           build the FIPS provider.
         #   tests: omit this to run all the tests using QEMU, set it to "none"
         #          to never run the tests, otherwise it's value is passed to
         #          the "make test" command to allow selectiving disabling of
@@ -40,23 +42,26 @@ jobs:
           }, {
             arch: hppa-linux-gnu,
             libs: libc6-dev-hppa-cross,
-            target: linux-generic32,
-            tests: none #-test_includes -test_store -test_x509_store
+            target: -static linux-generic32,
+            fips: no,
+            tests: -test_includes -test_store -test_x509_store
           }, {
             arch: m68k-linux-gnu,
             libs: libc6-dev-m68k-cross,
-            target: linux-latomic no-asm,
-            tests: none #-test_includes -test_store -test_x509_store -test_includes
+            target: -static -m68040 linux-latomic,
+            fips: no,
+            tests: -test_includes -test_store -test_x509_store
           }, {
             arch: mips-linux-gnu,
             libs: libc6-dev-mips-cross,
-            target: linux-mips32,
-            tests: none
+            target: -static linux-mips32,
+            fips: no,
+            tests: -test_includes -test_store -test_x509_store
           }, {
             arch: mips64-linux-gnuabi64,
             libs: libc6-dev-mips64-cross,
-            target: linux64-mips64,
-            tests: none
+            target: -static linux64-mips64,
+            fips: no
           }, {
             arch: mipsel-linux-gnu,
             libs: libc6-dev-mipsel-cross,
@@ -77,9 +82,37 @@ jobs:
           }, {
             arch: sh4-linux-gnu,
             libs: libc6-dev-sh4-cross,
-            target: linux-latomic,
-            tests: -test_includes -test_store -test_x509_store -test_async
+            target: no-async linux-latomic,
+            tests: -test_includes -test_store -test_x509_store
+          },
+
+          # These build with shared libraries but they crash when run
+          # They mirror static builds above in order to cover more of the
+          # code base.
+          {
+            arch: hppa-linux-gnu,
+            libs: libc6-dev-hppa-cross,
+            target: linux-generic32,
+            tests: none
           }, {
+            arch: m68k-linux-gnu,
+            libs: libc6-dev-m68k-cross,
+            target: -mcfv4e linux-latomic,
+            tests: none
+          }, {
+            arch: mips-linux-gnu,
+            libs: libc6-dev-mips-cross,
+            target: linux-mips32,
+            tests: none
+          }, {
+            arch: mips64-linux-gnuabi64,
+            libs: libc6-dev-mips64-cross,
+            target: linux64-mips64,
+            tests: none
+          },
+
+          # This build doesn't execute either with or without shared libraries.
+          {
             arch: sparc64-linux-gnu,
             libs: libc6-dev-sparc64-cross,
             target: linux64-sparcv9,
@@ -96,11 +129,18 @@ jobs:
             ${{ matrix.platform.libs }}
     - uses: actions/checkout at v2
 
-    - name: config
+    - name: config with FIPS
+      if: matrix.platform.fips != 'no'
       run: |
         ./config --banner=Configured --strict-warnings enable-fips \
                  --cross-compile-prefix=${{ matrix.platform.arch }}- \
                  ${{ matrix.platform.target }}
+    - name: config without FIPS
+      if: matrix.platform.fips == 'no'
+      run: |
+        ./config --banner=Configured --strict-warnings \
+                 --cross-compile-prefix=${{ matrix.platform.arch }}- \
+                 ${{ matrix.platform.target }}
     - name: config dump
       run: ./configdata.pm --dump
 
diff --git a/test/params_conversion_test.c b/test/params_conversion_test.c
index 48d01cac68..9422ef1473 100644
--- a/test/params_conversion_test.c
+++ b/test/params_conversion_test.c
@@ -279,8 +279,28 @@ static int param_conversion_test(const PARAM_CONVERSION *pc, int line)
             return 0;
         }
     } else {
-        if (!TEST_true(OSSL_PARAM_get_double(pc->param, &d))
-            || !TEST_true(d == pc->d)) {
+        if (!TEST_true(OSSL_PARAM_get_double(pc->param, &d))) {
+            TEST_note("unable to convert to double on line %d", line);
+            return 0;
+        }
+        /*
+         * Check for not a number (NaN) without using the libm functions.
+         * When d is a NaN, the standard requires d == d to be false.
+         * It's less clear if d != d should be true even though it generally is.
+         * Hence we use the equality test and a not.
+         */
+        if (!(d == d)) {
+            /*
+             * We've encountered a NaN so check it's really meant to be a NaN.
+             * We ignore the case where the two values are both different NaN,
+             * that's not resolvable without knowing the underlying format
+             * or using libm functions.
+             */
+            if (!TEST_false(pc->d == pc->d)) {
+                TEST_note("unexpected NaN on line %d", line);
+                return 0;
+            }
+        } else if (!TEST_true(d == pc->d)) {
             TEST_note("unexpected conversion to double on line %d", line);
             return 0;
         }


More information about the openssl-commits mailing list