我不能让Jarsigner使用HTTPS代理。对于我的系统,我已经在/etc/sysconfig/proxy中配置了http & https代理。我甚至在Java控件中添加了代理。
使用wget和代理进行检查是有效的:
user@machineLinx:~/workspace/myApp> wget https://timestamp.geotrust.com/tsa
--2015-10-05 16:06:30-- https://timestamp.geotrust.com/tsa
Resolving proxy.spacetec.no... 100.11.4.6
Connecting to proxy.spacetec.no|100.11.4.6|:3128... connected.
Proxy request sent, awaiting response... 404 Not Found
2015-10-05 16:06:31 ERROR 404: Not Found.使用Jarsigner不使用提供的代理:
/usr/java/jdk1.7.0_80/bin/jarsigner -J-Dhttps.proxyHost=http://proxy.company.com -J-Dhttps.proxyPort=3128 -keystore /home/user/keystore.p12 -storepass myStorePass -storetype pkcs12 -tsa https://timestamp.geotrust.com/tsa workspace/myApp/target/myApp-1.0.0-SNAPSHOT.jar alias
jarsigner: unable to sign jar: no response from the Timestamping Authority. When connecting from behind a firewall an HTTP or HTTPS proxy may need to be specified. Supply the following options to jarsigner:
-J-Dhttp.proxyHost=<hostname>
-J-Dhttp.proxyPort=<portnumber>
or
-J-Dhttps.proxyHost=<hostname>
-J-Dhttps.proxyPort=<portnumber> 那么,为什么代理在我的系统上工作,而不使用Java呢?我试过jdk1.7.0_80和jdk1.8.0_60
jarsigner使用RFC 3161中定义的时间戳协议(TSP)与TSA通信。该协议基本上假设TSA上的侦听器进程可以在定义良好的端口(IP端口号318)上接受TSA消息。
难道我的代理没有与TSP的这个端口通信吗?
发布于 2015-10-06 10:12:26
删除http://从代理主机修复了此问题
-J-Dhttps.proxyHost=proxy.company.com -J-Dhttps.proxyPort=3128https://stackoverflow.com/questions/32950717
复制相似问题