Two tweaks to CAVP outputs to conform to NIST's expectations.
Response files should have a “.rsp” suffix, and a magic header is needed
in the CTR-DRBG output.
Change-Id: I5dce7929e872cec394e70d3495d76b589e27dd4a
Reviewed-on: https://boringssl-review.googlesource.com/15884
Commit-Queue: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/fipsoracle/cavp_ctr_drbg_test.cc b/fipsoracle/cavp_ctr_drbg_test.cc
index 73743be..7a47cbf 100644
--- a/fipsoracle/cavp_ctr_drbg_test.cc
+++ b/fipsoracle/cavp_ctr_drbg_test.cc
@@ -135,7 +135,7 @@
for (int i = 0; i < argc; i++) {
printf(" %s", argv[i]);
}
- printf("\r\n\r\n");
+ printf("\r\n# CTR_DRBG options: AES-256 no df\r\n\r\n");
return FileTestMainSilent(TestCTRDRBG, &ctx, argv[1]);
}
diff --git a/fipsoracle/run_cavp.go b/fipsoracle/run_cavp.go
index b5a09c0..fa7f089 100644
--- a/fipsoracle/run_cavp.go
+++ b/fipsoracle/run_cavp.go
@@ -319,7 +319,7 @@
args = append(args, test.args...)
args = append(args, filepath.Join(suite.getDirectory(), "req", test.inFile+".req"))
- outPath := filepath.Join(suite.getDirectory(), "resp", test.inFile+".resp")
+ outPath := filepath.Join(suite.getDirectory(), "resp", test.inFile+".rsp")
outFile, err := os.OpenFile(outPath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
return fmt.Errorf("cannot open output file for %q %q: %s", suite.getDirectory(), test.inFile, err)
@@ -353,7 +353,7 @@
faxScanFunc = (*bufio.Scanner).Scan
}
- respPath := filepath.Join(suite.getDirectory(), "resp", test.inFile+".resp")
+ respPath := filepath.Join(suite.getDirectory(), "resp", test.inFile+".rsp")
respFile, err := os.Open(respPath)
if err != nil {
return fmt.Errorf("cannot read output of %q %q: %s", suite.getDirectory(), test.inFile, err)