我正在使用XMPPFramework并使用自签名证书。我已使用
修改了设置[settings setObject:[NSNumber numberWithBool:YES] forKey:(NSString *)kCFStreamSSLAllowsAnyRoot];
和
[settings setObject:[NSNumber numberWithBool:NO]
forKey:(NSString *)kCFStreamSSLValidatesCertificateChain];
我已经验证我可以使用Psi连接。有没有人见过这个错误?
XMPPAccountSession: xmppStream:socketDidConnect:
SEND: <?xml version='1.0'?>
SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='senior'>
RECV: <stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" from="senior" id="3f557041-1a9f-4838-8e53-1c7d1b9720a9" version="1.0" stream1:lang="en"/>
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<ver xmlns="urn:xmpp:features:rosterver"/>
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"
><mechanism>PLAIN</mechanism>
<mechanism>ANONYMOUS</mechanism></mechanisms>
<register xmlns="http://jabber.org/features/iq-register"/>
<auth xmlns="http://jabber.org/features/iq-auth"/>
</stream:features>
SEND: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
SEND: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' to='senior'>
XMPPAccountSession: xmppStreamDidSecure:
XMPPAccountSession: xmppStreamDidDisconnect:withError:
Error Domain=NSPOSIXErrorDomain Code=54 "The operation couldn’t be completed. Connection reset by peer"