TLS/SSL and SocketStreams

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TLS/SSL and SocketStreams

darth-cheney
Hello,

In the process of maintaining a small IRC client I have written, I'm trying to add the option to connect over SSL. Of course ensuring valid certificates and the handshake et al is quite complicated. Instead I'm attempting to rely on Zodiac's `ZdcSecureSocketStream` instead of a regular `SocketStream` for the connection.
 
Here is where I run into a snag: `ZdcSecureSocketStream` is it's own complete rewrite. And though there are attempts to keep many of the same messages as `SocketStream`, some of the key ones are missing. In particular, I would like to have `#upToAll:` and even `nextLine` if possible. Attempting to subclass and implement them myself has been a disaster, since `ZdcSecureSocketStream` is actually quite complex.

Can anyone help me with the following:
* Is there a better way to implement an SSL connection over a socket?
* Who maintains Zodiac? How can I contact them?

Thanks

--
Eric
Reply | Threaded
Open this post in threaded view
|

Re: TLS/SSL and SocketStreams

Sven Van Caekenberghe-2
Hi Eric,

> On 25 Apr 2018, at 22:25, Eric Gade <[hidden email]> wrote:
>
> Hello,
>
> In the process of maintaining a small IRC client I have written, I'm trying to add the option to connect over SSL. Of course ensuring valid certificates and the handshake et al is quite complicated. Instead I'm attempting to rely on Zodiac's `ZdcSecureSocketStream` instead of a regular `SocketStream` for the connection.
>  
> Here is where I run into a snag: `ZdcSecureSocketStream` is it's own complete rewrite. And though there are attempts to keep many of the same messages as `SocketStream`, some of the key ones are missing. In particular, I would like to have `#upToAll:` and even `nextLine` if possible. Attempting to subclass and implement them myself has been a disaster, since `ZdcSecureSocketStream` is actually quite complex.
>
> Can anyone help me with the following:
> * Is there a better way to implement an SSL connection over a socket?

Not that I know of.

> * Who maintains Zodiac? How can I contact them?

Me, mostly, but not the plugin part.

The Zdc socket streams are binary. If you wrap them with a ZnCharacterReadStream (and a proper encoding) you get #nextLine , #upToAll: and even #match:

Sending #asString to a ByteArray is wrong (as it implies a null decoding).

Sven

> Thanks
>
> --
> Eric