# HG changeset patch # User Daiki Ueno # Date 1599144357 -7200 # Thu Sep 03 16:45:57 2020 +0200 # Node ID e9841b583576dc54ad0de36abc84b764a5b80f0f # Parent 9213848965f624055e3f2147f584e2433c355432 Bug 1662738, run RNG self-tests only if NSPR is linked, r?rrelyea 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. Reviewers: rrelyea Tags: #secure-revision Bug #: 1662738 Differential Revision: https://phabricator.services.mozilla.com/D89250 diff -r 9213848965f6 -r e9841b583576 lib/freebl/fipsfreebl.c --- a/lib/freebl/fipsfreebl.c Wed Sep 02 10:45:48 2020 -0700 +++ b/lib/freebl/fipsfreebl.c Thu Sep 03 16:45:57 2020 +0200 @@ -2023,18 +2023,18 @@ if (rv != SECSuccess) return rv; + } + + /* + * test the rest of the algorithms not accessed through freebl + * standalone */ + if (tests & DO_REST) { /* RNG Power-Up SelfTest(s). */ rv = freebl_fips_RNG_PowerUpSelfTest(); if (rv != SECSuccess) return rv; - } - - /* - * test the rest of the algorithms not accessed through freebl - * standalone */ - if (tests & DO_REST) { /* DES3 Power-Up SelfTest(s). */ rv = freebl_fips_DES3_PowerUpSelfTest();