Author: centic
Date: Mon Nov 10 20:37:26 2014
New Revision: 1637979

URL: http://svn.apache.org/r1637979
Log:
Bug 57197: use proxy for TestSignatureInfo if set via environment variables

Modified:
    poi/trunk/build.xml
    
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java

Modified: poi/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1637979&r1=1637978&r2=1637979&view=diff
==============================================================================
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Mon Nov 10 20:37:26 2014
@@ -86,8 +86,9 @@ under the License.
     <property name="poi.test.locale" value="-Duser.language=en 
-Duser.country=US"/>
     <property name="POI.testdata.path" value="test-data"/>
     <property name="java.awt.headless" value="true"/>
-       <property name="additionaljar" value=""/>
-    
+    <property name="additionaljar" value=""/>
+    <property name="http_proxy" value="${env.http_proxy}"/>
+
     <!-- Main: -->
     <property name="main.resource1.dir" value="src/resources/main"/>
     <property name="main.src" location="src/java"/>
@@ -227,6 +228,7 @@ under the License.
         <propertyref name="POI.testdata.path"/>
         <propertyref name="java.awt.headless"/>
         <propertyref name="org.apache.poi.util.POILogger"/>
+        <propertyref name="http_proxy"/>
     </propertyset>
 
     <path id="main.classpath">

Modified: 
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java?rev=1637979&r1=1637978&r2=1637979&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java 
(original)
+++ 
poi/trunk/src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java 
Mon Nov 10 20:37:26 2014
@@ -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(){



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to