From 36e46097e3bd50111873b76772d3bd8ca74b0fb2 Mon Sep 17 00:00:00 2001 From: Weimin Yu Date: Mon, 3 Feb 2020 11:02:52 -0500 Subject: [PATCH] Allow non-CA cert as trust anchor in tests (#468) * Allow non-CA cert as trust anchor in tests Stay with the legacy behavior to unblock release build. We will update the test cert generation code later. TESTED=reproduced and fixed test failures in builder container --- networking/build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/networking/build.gradle b/networking/build.gradle index 0173eadc8..74fe4d0d2 100644 --- a/networking/build.gradle +++ b/networking/build.gradle @@ -41,6 +41,12 @@ dependencies { testAnnotationProcessor deps['com.google.dagger:dagger-compiler'] } +test { + // Temporarily allow non-CA cert as trust anchor (legacy behavior) in tests. + // TODO(weiminyu): generate test cert as a CA cert. + systemProperty 'jdk.security.allowNonCaAnchor', 'true' +} + // Make testing artifacts available to be depended up on by other projects. task testJar(type: Jar) { classifier = 'test'