简体   繁体   English

在Apache Tomcat 7.0.47上配置的SSL

[英]Configured SSL on Apache Tomcat 7.0.47

Have implemented SSL with self-signed certificate On Apache Tomcat 7.0.47 using Java keytool.exe.It's working fine in Browser. 已使用Java keytool.exe在Apache Tomcat 7.0.47上实现了带有自签名证书的SSL.Browser在浏览器中运行良好。

Issues are: 1) while invoking the API's in java/dot net client am getting exception as "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel" 问题是:1)调用java / dot net客户端中的API时,由于“底层连接已关闭:无法建立SSL / TLS安全通道的信任关系”而异常

Solutions i got through online are: 1) Need to ignore invalid certificates then what's the use of SSL implementation. 我在线获得的解决方案是:1)需要忽略无效证书,然后SSL实施的用途是什么。 2) Need to import cert into client truststore. 2)需要将证书导入客户端信任库。

Could anyone suggest me how to solve this problem,is anyother ways to implement SSL and invoke those API's in client application. 谁能建议我如何解决此问题,还有其他方法可以实现SSL并在客户端应用程序中调用那些API。 don't want to ignore the Cert 不想忽略证书

It's working fine in java client using InstallerCert.java class but need to invoke HTTPs API's in dot net client,any help would be really appreciated 使用InstallerCert.java类在Java客户端中运行正常,但需要在点网客户端中调用HTTPs API,我们将不胜感激

Thanks in Advance 提前致谢

You need to establish trust relationship between client and server, in order to call server APIs. 您需要在客户端和服务器之间建立信任关系,才能调用服务器API。 For java you can follow these steps to achieve your goal - 对于Java,您可以按照以下步骤实现目标-

  • Generate certificate for server (You can do this by using installCert.java) 生成服务器证书(您可以使用installCert.java来完成)
  • Once this certificate is generated usually it will be keystore file and/or .cert file 一旦生成此证书,通常它将是密钥库文件和/或.cert文件
  • You copy this file(s) into your JAVA_HOME/lib directory 您将此文件复制到您的JAVA_HOME / lib目录中
  • Then restart your server and this should be done 然后重新启动服务器,这应该完成

More info can be found from these sources - security-ssl-certificate-error-use-your-trusted-certificate and http://miteff.com/install-cert 可以从以下来源找到更多信息-security-ssl-certificate-error-use-your-trusted-certificatehttp://miteff.com/install-cert

Hope this helps. 希望这可以帮助。 There are other ways also, to generate certificate but this way is easiest as per my understanding. 还有其他生成证书的方法,但是据我所知,这种方法最简单。 :-) :-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM