[JDEV] SSL Yet Again

Chris Pile cpile at snoogans.co.uk
Fri Oct 5 10:02:41 CDT 2001


Top darts!

Seems to work ok.

I done the following:

FreeBSD4.3
- checked out jabber2 from the CVS
- installed pth-1.4.0:
   "pkg-add -r
ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/4.3-RELEASE/packages/devel/pth-1.4.0.tgz"
- installed gmake:
   "pkg-add -r
ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/4.3-RELEASE/packages/devel/gmake-3.79.1.tgz"
- "./configure --enable-ssl"
- "gmake"
   compiled fine
- customised jabber.xml

Tested connecting with JabberIM 1.10.0.6 on W2K.  Using the OpenSSL
libraries from:
http://download.sourceforge.net/jabbercom/jabbercom_openssl096.zip

Here is some output.

--

su-2.05# netstat -an
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address       
(state)
tcp4       0      0  192.168.1.1.5223    192.168.1.2.3243     
ESTABLISHED



Fri Oct  5 15:34:00 2001  mtq 8147100 leaving to pth
Fri Oct  5 15:34:00 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:00 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:00 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio.c:377 _mio_accept calling accept on fd #8
Fri Oct  5 15:34:01 2001  mio_ssl.c:230 SSL accepting socket with new
session 80c7900
Fri Oct  5 15:34:01 2001  mio_ssl.c:243 Accept blocked, returning
Fri Oct  5 15:34:01 2001  mio.c:404 new socket accepted (fd: 14, ip:
192.168.1.2, port: 3134)
Fri Oct  5 15:34:01 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio.c:755 MIO read from socket 14:
Fri Oct  5 15:34:01 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio_ssl.c:145 Asked to read 8191 bytes from 14
Fri Oct  5 15:34:01 2001  mio_ssl.c:159 Read blocked, returning
Fri Oct  5 15:34:01 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio_ssl.c:145 Asked to read 8191 bytes from 14
Fri Oct  5 15:34:01 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio_ssl.c:145 Asked to read 8191 bytes from 14
Fri Oct  5 15:34:01 2001  mio.c:755 MIO read from socket 14:
<stream:stream to="jabber.example.com" xmlns="jabber:client"
xmlns:stream="http://etherx.jabber.org/streams">
Fri Oct  5 15:34:01 2001  c2s [client.c:265] pthsock_client_read called
with: m:808DA80 flag:2 arg:80906C0
Fri Oct  5 15:34:01 2001  c2s [client.c:298] root received for 14
Fri Oct  5 15:34:01 2001  c2s [client.c:303] Recieved connection to:
jabber.example.com
Fri Oct  5 15:34:01 2001  mio.c:1037 mio_write called on x: 0 buffer:
<?xml version='1.0'?><stream:stream
xmlns:stream='http://etherx.jabber.org/streams' id='3BBDC4D9'
xmlns='jabber:client' from='jabber.example.com'>
Fri Oct  5 15:34:01 2001  mio.c:276 write_dump writing data: <?xml
version='1.0'?><stream:stream
xmlns:stream='http://etherx.jabber.org/streams' id='3BBDC4D9'
xmlns='jabber:client' from='jabber.example.com'>
Fri Oct  5 15:34:01 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio_ssl.c:145 Asked to read 8191 bytes from 14
Fri Oct  5 15:34:01 2001  mio.c:755 MIO read from socket 14: <iq
type="get" id="JCOM_8"><query
xmlns="jabber:iq:auth"><username>chris</username></query></iq>
Fri Oct  5 15:34:01 2001  c2s [client.c:265] pthsock_client_read called
with: m:808DA80 flag:3 arg:80906C0
Fri Oct  5 15:34:01 2001  deliver.c:460 DELIVER 4:jabber.example.com
<route type='auth' to='chris at jabber.example.com'
from='14 at c2s/808DA80'><iq type='get' id='JCOM_8'><query
xmlns='jabber:iq:auth'><username>chris</username></query></iq></route>
Fri Oct  5 15:34:01 2001  deliver.c:651 delivering to instance
'sessions'
Fri Oct  5 15:34:01 2001  deliver.c:83 (8090240)incoming packet <route
type='auth' to='chris at jabber.example.com' from='14 at c2s/808DA80'><iq
type='get' id='JCOM_8'><query
xmlns='jabber:iq:auth'><username>chris</username></query></iq></route>
Fri Oct  5 15:34:01 2001  util.c:92 config query auth
Fri Oct  5 15:34:01 2001  mtq 8147000 entering from pth
Fri Oct  5 15:34:01 2001  mtq 8147000 one call 815FC38
Fri Oct  5 15:34:01 2001  authreg.c:52 auth request
Fri Oct  5 15:34:01 2001  users.c:132
js_user(chris at jabber.example.com,8166000)
.
.
Fri Oct  5 15:34:01 2001  mio.c:604 mio while loop top
Fri Oct  5 15:34:01 2001  mio.c:617 mio while loop, working
Fri Oct  5 15:34:01 2001  mio_ssl.c:145 Asked to read 8191 bytes from 14
Fri Oct  5 15:34:01 2001  mio.c:755 MIO read from socket 14: <iq
id="vcard_356" type="get" to="chris at jabber.snoogans.co.uk/Jabber Instant
Messenger"><query xmlns="vcard-temp"/></iq>
.
.
Fri Oct  5 15:34:43 2001  mio.c:871 MIO is shutting down
Fri Oct  5 15:34:43 2001  c2s [client.c:265] pthsock_client_read called
with: m:808DA80 flag:4 arg:80906C0
Fri Oct  5 15:34:43 2001  c2s [client.c:270] io_select Socket 14 close
notification
Fri Oct  5 15:34:43 2001  mio_ssl.c:132 SSL Cleanup for 80c7900
Fri Oct  5 15:34:43 2001  mio.c:363 freed MIO socket
Fri Oct  5 15:34:43 2001  mio.c:363 freed MIO socket
Fri Oct  5 15:34:43 2001  mio.c:363 freed MIO socket

--

Looks like the whole mio loop works when "SSL_ERROR_WANT_*" occurs. 
Takes a few goes but gets there in the end.  Let me know if you need
anymore debug output, I only grabbed a few chunks that look relevant.

I still want to do some more testing, but so far so good.  Sorry for
delay in response but hadn't checked the list for a few days.


Thanks,
Chris.

temas wrote:
> 
> Ok, I think we've got it this time.  Current CVS works on the places I
> could test that didn't work previously.  I would love if people could
> test this ASAP and let me know so it can be in 1.4.2.
> 
> --temas
> 
>   ------------------------------------------------------------------------
>    Part 1.2Type: application/pgp-signature



More information about the JDev mailing list