Last Comment Bug 354565 - fipstest sha_test needs to detect SHA tests that are incorrectly configured for BIT oriented implementations
: fipstest sha_test needs to detect SHA tests that are incorrectly configured f...
Status: RESOLVED FIXED
:
Product: NSS
Classification: Components
Component: Tools (show other bugs)
: 3.11.3
: All All
: -- enhancement (vote)
: 3.12
Assigned To: Wan-Teh Chang
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-27 15:02 PDT by Wan-Teh Chang
Modified: 2006-10-06 16:51 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Proposed patch (747 bytes, patch)
2006-09-27 15:07 PDT, Wan-Teh Chang
neil.williams: review+
glenbeasley: superreview+
Details | Diff | Review

Description Wan-Teh Chang 2006-09-27 15:02:44 PDT
The sha_test function in the fipstest test program needs
to detect SHA tests that are incorrectly configured for
BIT oriented implementations.  NSS is a BYTE oriented
implementation.
Comment 1 Wan-Teh Chang 2006-09-27 15:07:27 PDT
Created attachment 240364 [details] [diff] [review]
Proposed patch

The message lengths are in bits.  For a BYTE oriented
implementation, the message lengths are multiples of 8.
For a BIT oriented implementation, the message lengths
can be any integers.

So we fail with an error message (to stderr) if we see
a message length that's not a multiple of 8.
Comment 2 Wan-Teh Chang 2006-09-28 09:38:23 PDT
I checked in the patch on the NSS trunk (NSS 3.12).

Checking in fipstest.c;
/cvsroot/mozilla/security/nss/cmd/fipstest/fipstest.c,v  <--  fipstest.c
new revision: 1.31; previous revision: 1.30
done
Comment 3 Neil Williams 2006-10-06 12:49:00 PDT
Comment on attachment 240364 [details] [diff] [review]
Proposed patch

Shouldn't the message be "tests are incorrectly configured..."?
Comment 4 Wan-Teh Chang 2006-10-06 16:51:16 PDT
Neil, I made the change you suggested.  Thanks!

Checking in fipstest.c;
/cvsroot/mozilla/security/nss/cmd/fipstest/fipstest.c,v  <--  fipstest.c
new revision: 1.32; previous revision: 1.31
done

Note You need to log in before you can comment on or make changes to this bug.