Re: [dev] sj: ucspi

From: Matthew of Boswell <mordervomubel+suckless_AT_lockmail.us>
Date: Thu, 19 Nov 2015 14:54:34 -0500

On Thu, 19 Nov 2015 14:10:19 -0500
Greg Reagle <greg.reagle_AT_umbc.edu> wrote:

> Howdy. This is probably obvious to non-newbies so please don't make fun
> of me *too* much.
>
> Anyway, I can compile and run sj but it dies at this line in xmpp_init()
> if (write(WRITE_FD, msg, size) < 0)
>
> which refers to this:
> /* ucspi */
> #define WRITE_FD 7
> #define READ_FD 6
>
> but these file descriptors are never initialized or opened. What's missing?
>

Actually, I couldn't figure it out either. I spent an hour or so trying
to get it to compile (GNU Make 4.1 doesn't seem to like ":" in target
and filenames) and trying to figure out how to get ucspi working. I
installed ucspi-tcp 0.88-5 from the archlinux AUR and built
https://github.com/younix/ucspi.git .

It looks like ucspi opens a file handle for input and output (6 and 7).
This stumped me for a bit as well, but it looks like ucspi opens it and
hands it over to the actual sj program. Here's what I eventually tried:

# tcpclient dukgo.com 5222 sj -u gnuman -s dukgo.com -r resources\
-d /home/matt/.xmpp

password:
sj: <failure xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><encryption-required/></failure>

Then I realized that of course, I need encryption...

# tcpclient dukgo.com 5222 ./sslc ../sj/sj -u gnuman -s dukgo.com -r\
resources -d /home/matt/.xmpp

./sslc: invalid option -- 'u'

Oops... it tried to parse sj's parameters...


# tcpclient dukgo.com 5222 ./sslc ../sj/sj -- -u gnuman -s dukgo.com -r\
resources -d /home/matt/.xmpp

password: sslc: Success
main: Input/output error


So my next guess is that it needs tlsc, not sslc. Seems it needs
LibreSSL's tls.h to compile, though... Am I on the right track?

At this point, I decided that the project wasn't meant for other people
to look at yet, and that I should wait for the author to update his
documentation. The instructions appear to how to use the program before
it was modified to use ucspi.

I was interested in making something like this (recently inspired by
Irc It), but figured best to start with an existing project.

-- 
Matt Boswell
Received on Thu Nov 19 2015 - 20:54:34 CET

This archive was generated by hypermail 2.3.0 : Thu Nov 19 2015 - 21:00:12 CET