[英]Connect to Tibco EMS using SSL java client
We are trying to connect to Tibco EMS using SSL (Java Client) with the following code我们正在尝试使用 SSL(Java 客户端)和以下代码连接到 Tibco EMS
factory = new com.tibco.tibjms.TibjmsConnectionFactory(serverUrl);
connection = factory.createConnection(userName,password);
I receive this error:我收到此错误:
Failed to connect via SSL to [ssl://host:8132]: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
无法通过 SSL 连接到 [ssl://host:8132]:sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到到请求目标的有效认证路径
How to specify certification path to requested target?如何指定到请求目标的认证路径? I have C# client code with
EMSSSL.SetTargetHostName("UAT_5653")
but in java JMS dont know how to set我有带有
EMSSSL.SetTargetHostName("UAT_5653")
C# 客户端代码,但在 Java JMS 中不知道如何设置
com.tibco.tibjms.TibjmsSSL.setExpectedHostName(ssl_hostname);
com.tibco.tibjms.TibjmsSSL.setIdentity(ssl_identity,ssl_key,ssl_password);
com.tibco.tibjms.TibjmsSSL.setVerifyHostName(false);
com.tibco.tibjms.TibjmsSSL.addTrustedCerts(cert);
These parameters can be set in the factory object like:这些参数可以在工厂对象中设置,例如:
TibjmsConnectionFactory factory = new com.tibco.tibjms.TibjmsConnectionFactory(serverUrl);
factory.setSSLExpectedHostName(ssl_expected_hostname);
factory.setSSLIdentity(ssl_identity,ssl_key,ssl_password);
factory.setSSLEnableVerifyHostName(false);
factory.setSSLTrustedCertificate(cert);
Connection connection = factory.createConnection(userName,password);
For more information you might take a look at the docs .有关更多信息,您可以查看文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.