Recent

Author Topic: Simple XMPP implementation- Testing using OpenFire Localhost setup  (Read 6694 times)

BitBitter

  • New Member
  • *
  • Posts: 18
Simple XMPP implementation seems to be updated version from UXMPP-Master.  I have setup OpenFire 1.4.2 on top of windows Localhost config to allow anonymous connection.  I compile the simple XMPP on Lazarus 1.6.2. 

I get the following error message on the client and nothing on the Server side:
=> <?xml version="1.0"?>
=> <stream:stream to="localhost"  xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"  version="1.0">
<= <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="metafire" id="4fa2g40gva" xml:lang="en" version="1.0">
<= <stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>EXTERNAL</mechanism><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><register xmlns="http://jabber.org/features/iq-register"/></stream:features>
=> <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<= <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
ERROR: 10091,
ERROR: 10054,Connection reset by peer
Logged out
 

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Simple XMPP implementation- Testing using OpenFire Localhost setup
« Reply #1 on: July 18, 2017, 08:24:17 pm »
Quote
ERROR: 10091,
ERROR: 10054,Connection reset by peer
Those are windows socket related error, see here.

Quote
=> <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
Do you have (correct) ssl libraries installed ?

BitBitter

  • New Member
  • *
  • Posts: 18
Re: Simple XMPP implementation- Testing using OpenFire Localhost setup
« Reply #2 on: July 18, 2017, 08:46:14 pm »
I have read previous write regarding the Lib where Unix and Windows def is switch.  In this new update lib it has Linux instead of Unix.   

I don't think its the issue with winsock from Windows because I am able to connect using different XMPP client (sparks) to the Server.  We can rule out the Server Issue.


I believe the problem is in the following area:

OpenSSL (required) as in the note.  I am using the [ ssl_openssl_lib ] that was bundle with this package.

This can also be the issue with log in credentials/sert which I plan to do more research on. 


I am going to be using this program for chat community for kids to do their homework.  I see there are many other uses for this.  It will be wonderful to clean it up to make it part of Lazarus like they have with Indy10 for Delphi.
 

BitBitter

  • New Member
  • *
  • Posts: 18
Re: Simple XMPP implementation- Testing using OpenFire Localhost setup
« Reply #3 on: July 18, 2017, 09:03:56 pm »
 %)

Following code is virgin from Github
{$IFDEF CIL}
const
  {$IFDEF LINUX}
  DLLSSLName = 'libssl';
  DLLUtilName = 'libcrypto';
  {$ELSE}
  DLLSSLName = 'ssleay32.dll';
  DLLUtilName = 'libeay32.dll';
  {$ENDIF}
{$ELSE}
var
  {$IFNDEF WIN32}
  DLLSSLName: string = 'libssl';
  DLLUtilName: string = 'libcrypto';
  {$ELSE}
  DLLSSLName: string = 'ssleay32.dll';
  DLLSSLName2: string = 'libssl32.dll';
  DLLUtilName: string = 'libeay32.dll';
  {$ENDIF}
{$ENDIF}

{$IFDEF LINUX}
  { ADD NEW ONES WHEN THEY APPEAR!
    Always make .so/dylib first, then versions, in descending order!
    Add "." .before the version, first is always just "" }
  DLLVersions: array[1..10] of string = ('', '.0.9.9'{futureproof :D}, '.0.9.8',
                                        '.0.9.7', '.0.9.6', '.0.9.5', '.0.9.4',
                                        '.0.9.3', '.0.9.2', '.0.9.1');
{$ENDIF}                                       
 

Previously
For anyone else following along I've figured out another big chunk of what was wrong.  To start I Googled for the protocol and once found followed along with the connection and what it should look like.  You can find out what a Google Talk connection should look like at the low-level here:

https://developers.google.com/cloud-print/docs/rawxmpp
     

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Simple XMPP implementation- Testing using OpenFire Localhost setup
« Reply #4 on: July 18, 2017, 09:52:25 pm »
No idea. Perhaps this can help you out ? (assuming that this github source is an updated version of the project you are currently using)

BitBitter

  • New Member
  • *
  • Posts: 18
Re: Simple XMPP implementation- Testing using OpenFire Localhost setup
« Reply #5 on: July 19, 2017, 12:00:08 am »
I am using the latest github title "simple XMPP Implementation"

BitBitter

  • New Member
  • *
  • Posts: 18
Re: Simple XMPP implementation- Testing using OpenFire Localhost setup
« Reply #6 on: July 19, 2017, 06:55:32 pm »
I was able to Anonymous login request but it still fail with Error: 10091.  After a minute the connect resets by peer message appears.

ERROR: 10091,

I am looking into the Library of TCPsynapse, synIP, snysocks. I'm guessing by default its trying to use IPv6 (which is not supported in this workstation).     I know the Windows socket layer works because I am using another client that makes calls to winsocks.




BitBitter

  • New Member
  • *
  • Posts: 18
Re: Simple XMPP implementation- Testing using OpenFire Localhost setup
« Reply #7 on: September 02, 2017, 04:23:28 am »
I've return to work on th project.  Discover that Server sends a request to the client go proceed by replying back with Certification denoted by the following:

<= <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>

Server didn't get a reply within time limited then the server closes the connection as per rules. 
Server requests, and client presents, the client certificate during TLS negotiation

Plz consider this incident closed.  Cert issues will be new incident if its becomes a problem.

 

TinyPortal © 2005-2018