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
@ -87,6 +87,7 @@ under the License.
|
||||
<property name="POI.testdata.path" value="test-data"/>
|
||||
<property name="java.awt.headless" value="true"/>
|
||||
<property name="additionaljar" value=""/>
|
||||
<property name="http_proxy" value="${env.http_proxy}"/>
|
||||
|
||||
<!-- Main: -->
|
||||
<property name="main.resource1.dir" value="src/resources/main"/>
|
||||
@ -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">
|
||||
|
@ -310,6 +310,12 @@ public class TestSignatureInfo {
|
||||
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(){
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user