Blame SOURCES/nss-softokn-glibc-skip-rng-self-tests.patch

892bb0
# HG changeset patch
892bb0
# User Daiki Ueno <dueno@redhat.com>
892bb0
# Date 1599144357 -7200
892bb0
#      Thu Sep 03 16:45:57 2020 +0200
892bb0
# Node ID e9841b583576dc54ad0de36abc84b764a5b80f0f
892bb0
# Parent  9213848965f624055e3f2147f584e2433c355432
892bb0
Bug 1662738, run RNG self-tests only if NSPR is linked, r?rrelyea
892bb0
892bb0
Summary: After the continuous DRBG test was added, RNG self-tests have no longer worked standalone. This moves the self-tests to the DO_REST block so it only runs when the program is also linked to NSPR.
892bb0
892bb0
Reviewers: rrelyea
892bb0
892bb0
Tags: #secure-revision
892bb0
892bb0
Bug #: 1662738
892bb0
892bb0
Differential Revision: https://phabricator.services.mozilla.com/D89250
892bb0
892bb0
diff -r 9213848965f6 -r e9841b583576 lib/freebl/fipsfreebl.c
892bb0
--- a/lib/freebl/fipsfreebl.c	Wed Sep 02 10:45:48 2020 -0700
892bb0
+++ b/lib/freebl/fipsfreebl.c	Thu Sep 03 16:45:57 2020 +0200
892bb0
@@ -2023,18 +2023,18 @@
892bb0
 
892bb0
         if (rv != SECSuccess)
892bb0
             return rv;
892bb0
+    }
892bb0
+
892bb0
+    /*
892bb0
+     * test the rest of the algorithms not accessed through freebl
892bb0
+     * standalone */
892bb0
+    if (tests & DO_REST) {
892bb0
 
892bb0
         /* RNG Power-Up SelfTest(s). */
892bb0
         rv = freebl_fips_RNG_PowerUpSelfTest();
892bb0
 
892bb0
         if (rv != SECSuccess)
892bb0
             return rv;
892bb0
-    }
892bb0
-
892bb0
-    /*
892bb0
-     * test the rest of the algorithms not accessed through freebl
892bb0
-     * standalone */
892bb0
-    if (tests & DO_REST) {
892bb0
 
892bb0
         /* DES3 Power-Up SelfTest(s). */
892bb0
         rv = freebl_fips_DES3_PowerUpSelfTest();