From d9bfd8ebdef54aeacca24872b1fb1d432b383774 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Mon, 10 Nov 2014 20:37:26 +0000 Subject: [PATCH] Bug 57197: use proxy for TestSignatureInfo if set via environment variables git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1637979 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 6 ++++-- .../org/apache/poi/poifs/crypt/TestSignatureInfo.java | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index 66c62f5efa..5490bd592f 100644 --- a/build.xml +++ b/build.xml @@ -86,8 +86,9 @@ under the License. - - + + + @@ -227,6 +228,7 @@ under the License. + diff --git a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java index d99aadd9ca..609a26d6b6 100644 --- a/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java +++ b/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java @@ -309,6 +309,12 @@ public class TestSignatureInfo { signatureConfig.setTspUrl("http://timestamp.comodoca.com/rfc3161"); signatureConfig.setTspRequestPolicy(null); // comodoca request fails, if default policy is set ... signatureConfig.setTspOldProtocol(false); + + //set proxy info if any + String proxy = System.getProperty("http_proxy"); + if (proxy != null && proxy.trim().length() > 0) { + signatureConfig.setProxyUrl(proxy); + } if (mockTsp) { TimeStampService tspService = new TimeStampService(){