smack客户端所需的SSL / TLS但服务器不支持

时间:2016-03-04 08:35:06

标签: ssl openfire smack

我正在尝试在Openfire和smack客户端之间建立安全连接并获取错误

org.jivesoftware.smack.SmackException$SecurityRequiredByClientException: 
SSL/TLS required by client but not supported by server

我正在使用Openfire 4.0.1并已启用5223。在客户端使用Smack和连接配置如下:

configBuilder.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
configBuilder.setServiceName(service_name);
configBuilder.setHost(server);
configBuilder.setPort(5223);
setHttpsClient(); // Sets a SSL context
configBuilder.setCustomSSLContext(mSSLContext);
configBuilder.setSocketFactory(mSSLContext.getSocketFactory());
connection = new XMPPTCPConnection( configBuilder.build( ) );
connection.connect();

初始交换服务器发送后

<stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism>
<mechanism>SCRAM-SHA-1</mechanism><mechanism>CRAM-MD5</mechanism>
<mechanism>DIGEST-MD5</mechanism></mechanisms><compression 
xmlns="http://jabber.org/features/compress"><method>zlib</method>
</compression><auth xmlns="http://jabber.org/features/iq-auth"/><register 
xmlns="http://jabber.org/features/iq-register"/></stream:features>

不包含starttls

0 个答案:

没有答案