You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/10/21 19:08:14 UTC
[trafficserver] branch 9.0.x updated: Fix a build issue on enabling
FIPS
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 1f5b382 Fix a build issue on enabling FIPS
1f5b382 is described below
commit 1f5b382a99d1bf092b92a2a68b3506c57eaedf32
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Thu Sep 26 15:08:47 2019 +0900
Fix a build issue on enabling FIPS
(cherry picked from commit 526efb0a22a2018ee79ac4851f5e392a47acbd37)
---
src/tscore/unit_tests/test_BufferWriterFormat.cc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/tscore/unit_tests/test_BufferWriterFormat.cc b/src/tscore/unit_tests/test_BufferWriterFormat.cc
index a3ef870..90f95d8 100644
--- a/src/tscore/unit_tests/test_BufferWriterFormat.cc
+++ b/src/tscore/unit_tests/test_BufferWriterFormat.cc
@@ -29,7 +29,10 @@
#include "tscore/BufferWriter.h"
#include "tscore/bwf_std_format.h"
#include "tscpp/util/MemSpan.h"
+#include "tscore/ink_config.h"
+#if TS_ENABLE_FIPS == 0
#include "tscore/INK_MD5.h"
+#endif
#include "tscore/CryptoHash.h"
using namespace std::literals;
@@ -252,6 +255,7 @@ TEST_CASE("BWFormat numerics", "[bwprint][bwformat]")
bw20.print("012345|{:^10s}|6789abc", true);
REQUIRE(bw20.view() == "012345| true |67");
+#if TS_ENABLE_FIPS == 0
INK_MD5 md5;
bw.reduce(0);
bw.print("{}", md5);
@@ -260,6 +264,7 @@ TEST_CASE("BWFormat numerics", "[bwprint][bwformat]")
bw.reduce(0);
bw.print("{}", md5);
REQUIRE(bw.view() == "e99a18c428cb38d5f260853678922e03");
+#endif
bw.reset().print("Char '{}'", 'a');
REQUIRE(bw.view() == "Char 'a'");
@@ -594,12 +599,14 @@ TEST_CASE("bwstring std formats", "[libts][bwprint]")
w.reset().print("{} bytes {} digits {}", sizeof(double), std::numeric_limits<double>::digits10, ts::bwf::Hex_Dump(2.718281828));
REQUIRE(w.view() == "8 bytes 15 digits 9b91048b0abf0540");
+#if TS_ENABLE_FIPS == 0
INK_MD5 md5;
w.reset().print("{}", ts::bwf::Hex_Dump(md5));
REQUIRE(w.view() == "00000000000000000000000000000000");
CryptoContext().hash_immediate(md5, s2.data(), s2.size());
w.reset().print("{}", ts::bwf::Hex_Dump(md5));
REQUIRE(w.view() == "f240ccd7a95c7ec66d6c111e2925b23e");
+#endif
}
// Normally there's no point in running the performance tests, but it's worth keeping the code