Closed Bug 1748237 Opened 3 years ago Closed 2 years ago

Running the FIPS self-test returns an incorrent result

Categories

(NSS :: Test, defect, P4)

3.74

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: anna.weine, Assigned: anna.weine)

Details

Attachments

(2 files)

Bltest fails to output an understandable result of the FIPS self-test.

Steps to reproduce:

bltest -F

Actual results:

CK_RV: 48.

Expected result:
Success/failure, if failure then maybe the exception code (48 in this case, apparently).

Version: 4.0 → 3.74
Attachment #9258052 - Attachment description: WIP: Bug 1748237: Adding a better error message. → Bug 1748237: Adding a better error message.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

It looks like as gyp defines by design NSS_FIPS_DISABLED, clang considered the code right after it as unreachable (with --enable-fips it worked).

The approach to have

#if defined NSS_FIPS_DISABLED && !defined(__clang__)
        fprintf(stdout, "FIPS self-test failed with: NSS_FIPS_DISABLED\n");
        return SECFailure;
#endif

worked, but I think removing these lines is more robust.

Attachment #9328901 - Attachment description: WIP: Bug 1748237 - Repairing unreachable code in clang built with gyp → Bug 1748237 - Repairing unreachable code in clang built with gyp
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: