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
This commit is contained in:
parent
3cf7699fde
commit
9f3e8b4919
@ -86,8 +86,9 @@ under the License.
|
|||||||
<property name="poi.test.locale" value="-Duser.language=en -Duser.country=US"/>
|
<property name="poi.test.locale" value="-Duser.language=en -Duser.country=US"/>
|
||||||
<property name="POI.testdata.path" value="test-data"/>
|
<property name="POI.testdata.path" value="test-data"/>
|
||||||
<property name="java.awt.headless" value="true"/>
|
<property name="java.awt.headless" value="true"/>
|
||||||
<property name="additionaljar" value=""/>
|
<property name="additionaljar" value=""/>
|
||||||
|
<property name="http_proxy" value="${env.http_proxy}"/>
|
||||||
|
|
||||||
<!-- Main: -->
|
<!-- Main: -->
|
||||||
<property name="main.resource1.dir" value="src/resources/main"/>
|
<property name="main.resource1.dir" value="src/resources/main"/>
|
||||||
<property name="main.src" location="src/java"/>
|
<property name="main.src" location="src/java"/>
|
||||||
@ -227,6 +228,7 @@ under the License.
|
|||||||
<propertyref name="POI.testdata.path"/>
|
<propertyref name="POI.testdata.path"/>
|
||||||
<propertyref name="java.awt.headless"/>
|
<propertyref name="java.awt.headless"/>
|
||||||
<propertyref name="org.apache.poi.util.POILogger"/>
|
<propertyref name="org.apache.poi.util.POILogger"/>
|
||||||
|
<propertyref name="http_proxy"/>
|
||||||
</propertyset>
|
</propertyset>
|
||||||
|
|
||||||
<path id="main.classpath">
|
<path id="main.classpath">
|
||||||
|
@ -309,6 +309,12 @@ public class TestSignatureInfo {
|
|||||||
signatureConfig.setTspUrl("http://timestamp.comodoca.com/rfc3161");
|
signatureConfig.setTspUrl("http://timestamp.comodoca.com/rfc3161");
|
||||||
signatureConfig.setTspRequestPolicy(null); // comodoca request fails, if default policy is set ...
|
signatureConfig.setTspRequestPolicy(null); // comodoca request fails, if default policy is set ...
|
||||||
signatureConfig.setTspOldProtocol(false);
|
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) {
|
if (mockTsp) {
|
||||||
TimeStampService tspService = new TimeStampService(){
|
TimeStampService tspService = new TimeStampService(){
|
||||||
|
Loading…
Reference in New Issue
Block a user