[jdev] Re: server TLS
Eric Will
rakaur at malkier.net
Tue Feb 14 12:21:25 CST 2006
After about a week or so of trying to get this sorted, I finally have.
It seems my main problem was that there's no SSLSocket#recv, and I was
treating SSLSocket#read as if it were recv, which
is not the case. SSLSocket#readpartial is what I was looking for, it just
took a really long time to find due to lack of documentation.
After figuring out readpartial, the rest wasn't hard to implement. I wrote a
simple TLS-enabled echo server here: http://www.ericw.org/ruby/echo/.
There's no comments or anything, I just used to to figure out what I was
doing wrong. It acts as a normal echo server until you send "+STARTTLS," in
which case it replies "+STARTTLS" and expects a TLS handshake to begin.
On 2/9/06, Eric Will <rakaur at malkier.net> wrote:
>
> I've figured out easily enough how to do client-to-server TLS.
> Unfortunately, I'm writing a server.
>
> I can't find any examples of using Ruby's OpenSSL library from a server
> point of view.
> I know how to create the socket, I know how to make an
> OpenSSL::X509::Certificate,
> but I don't know how to use them together to enable clients to connect.
>
> I just don't have any experience with OpenSSL, and I can't find any
> examples.
> Any help would be appreciated.
>
> --
> Eric Will -- http://www.ericw.org/
> xmpp:rakaur at malkier.net
> mailto: rakaur at malkier.net
--
Eric Will -- http://www.ericw.org/
xmpp:rakaur at malkier.net
mailto:rakaur at malkier.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20060214/c009bdea/attachment-0002.htm>
More information about the JDev
mailing list