Re: [Pharo-project] Help: Zodiac secure server.
Hi Prasad, On 08 Dec 2011, at 18:09, Prasad Khurd wrote:
Hello Sven, I am trying to write a zodiac secure server. I was able to successfully make a server copying most of the server part from Zinc Http server. Then, I tried replacing the SocketStream with your ZnSecureSocketStream but that didnât work⦠I havenât read much on SSL yet so I assumed whatever was sent from the secure stream of the client would be decrypted on the server using ZnSecureSocketStream â like a toggle mostly but I guess I am wrong. Iâd appreciate it if you could give me some pointers or if you had a sample of such a secure server implementation.
Thank you, Prasad
Thanks a lot for your interest in Zn+Zdc, this is a good area to work on. I haven't done this myself yet, for a couple of reasons: - lack of time - debugging Zdc was higher priority - client side was/is higher priority That being said, it would be nice if you could do a proof of concept. To make this work you have to do wrap a ZdcSecureSocketStream on: the socket that you get back from #waitForAcceptFor: The place to do this is in ZnSingleThreadedServer>>#socketStreamOn: It would be best to do this in a subclass from either ZnSingleThreadedServer or ZnMultiThreadedServer Then you have to set the server certificate on the stream by getting the #sslSession from the ZdcSecureSocketStream that you just created and calling #certificateName: (this won't work on Mac OS X due to missing functionality in the plugin). Finally you should do a #accept on the ZdcSecureSocketStream, if that works, the server should work transparently with the secure stream as if it is a regular one. Apart from debugging, there is no reason this should not work ;-) Good luck and please let me know how it goes! Regards, Sven
participants (1)
-
Sven Van Caekenberghe