[Gambas-user] Gambas3, ServerSocket and SSL support

Tobias Boege taboege at ...626...
Fri Sep 25 18:29:54 CEST 2015


On Fri, 25 Sep 2015, Alexie wrote:
> Hi All,
> 
> Gambas3 has a lot of networking features, including acting like a (Web)
> Server. Only thing what is lacking is SSL support and IPv6 (separate topic
> :-)) ... I made some code for DomotiGa, to support SSL in the ServerSocket.
> I basically create a wrapper around the ServerSocket and Socket, called the
> 'CServerSocket.class' and 'CSocket.class'. They resemble almost the same
> features/parameters/events of the original classes ... Including native
> support for HTTP and WebSocket, so you don't have to decode/parse it
> yourself - you get directly the good data with a read event ... It has been
> tested on Ubuntu and Raspbian devices. Also I have done some benchmarking
> and didn't notice impact on performance.
> 
> Attached is the code, including an example to use the 'new'
> CServerSocket.class and CSocket.class.
> 
> Just let me know if you like it or find bugs!
> 

It seems you are using OpenSSL libraries via Extern. We already have a
gb.openssl component, but it lacks SSL support. (Back then, I only cared
to transfer hashes and ciphers from libcrypto.)

If you know C, your work hours might be most profitable if you modify
gb.openssl instead of hacking with Extern. Once this modification is good
enough that you have no Extern left in your classes, those classes can
easily wander into a Gambas component like "gb.openssl.net" and override
gb.net's classes.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list