Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Starttls error #88

Open
kliver50 opened this issue Oct 21, 2019 · 0 comments
Open

Starttls error #88

kliver50 opened this issue Oct 21, 2019 · 0 comments

Comments

@kliver50
Copy link

kliver50 commented Oct 21, 2019

Error connect to server.

Starttls send after authentication.

Code
` $options = new Options('tcp://' . $server . ':' . $port);
$options->setUsername($user)
->setPassword($pass)
->setTo($domain)
// ->setLogger($logger)
->setContextOptions(['ssl'=>['allow_self_signed' => true, 'verify_peer' => false, 'verify_peer_name' => false]]);

$client = new Client($options);
$client->connect();
`
packet log (C - client, S - Server)
C:

<?xml version="1.0" encoding="UTF-8"?>
<stream:stream to="example.com" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" version="1.0">

S:
<?xml version='1.0'?><stream:stream id='17121742892586591802' version='1.0' xml:lang='ru' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' xmlns='jabber:client'>
S:
<stream:features><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>PLAIN</mechanism><mechanism>X-OAUTH2</mechanism></mechanisms><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><register xmlns='http://jabber.org/features/iq-register'/></stream:features>
C:
<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">base64 data</auth>
S:
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>
C:

<?xml version="1.0" encoding="UTF-8"?>
<stream:stream to="example.com" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" version="1.0">

S:
<?xml version='1.0'?><stream:stream id='17737822639213207479' version='1.0' xml:lang='ru' xmlns:stream='http://etherx.jabber.org/streams' from='example.com' xmlns='jabber:client'>
S:
<stream:features><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session xmlns='urn:ietf:params:xml:ns:xmpp-session'><optional/></session><c ver='MRePpsP+2TprEejkwaKRZINo4G0=' node='http://www.process-one.net/en/ejabberd/' hash='sha-1' xmlns='http://jabber.org/protocol/caps'/><csi xmlns='urn:xmpp:csi:0'/></stream:features>
C:
<iq type="set" id="fabiang_xmpp_5dadafdf2ba4a"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>pb</resource></bind></iq>
S:

<iq type='result' id='fabiang_xmpp_5dadafdf2ba4a'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>[email protected]/pb</jid></bind></iq>

C:
<iq type="set" id="fabiang_xmpp_5dadafdf51726"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq> S:
<iq xml:lang='ru' to='[email protected]/pb' from='[email protected]' type='result' id='fabiang_xmpp_5dadafdf51726'/>
C:
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
S:
<failure xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant