首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Jarsigner不使用提供的代理

Jarsigner不使用提供的代理
EN

Stack Overflow用户
提问于 2015-10-05 14:11:57
回答 1查看 4.4K关注 0票数 1

我不能让Jarsigner使用HTTPS代理。对于我的系统,我已经在/etc/sysconfig/proxy中配置了http & https代理。我甚至在Java控件中添加了代理。

使用wget和代理进行检查是有效的:

代码语言:javascript
复制
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不使用提供的代理:

代码语言:javascript
复制
/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的这个端口通信吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-06 10:12:26

删除http://从代理主机修复了此问题

代码语言:javascript
复制
-J-Dhttps.proxyHost=proxy.company.com -J-Dhttps.proxyPort=3128
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32950717

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档