You have reached the legacy GHI Electronics, LLC website, for the new website please visit here. For the new forum please visit here.

This legacy website will be taken offline at the end of this year. If there is anything that you would like to archive and save for future reference please do so.

NETMF Cobra III performing Https requests using ethernet ENC28 Module by RoSchmi

Oct. 30, 2016   |   Project   |   Licensed as Apache 2.0   |   1227 views

Since it seems that my beloved Gadgeteer Mainboards are sentenced to death, it is time to see how my Gadgeteer modules can be used on the remaining pure NETM Mainboards.
As a first try, I choose the GHI Ethernet ENC28 Module and the GHI Button Module, connected via the GXP Gadgeteer Bridge, to work with the Cobra III mainboard.
As I had problems to perform ssl secured https requests using the httpWebRequest Class, I made a wrapper Class to perform simple Https Requests using sockets and the SslStream Class.
As far as I can actually say, it seems to work quite well with servers allowing ssl connections via the TLS 1.0 protocol. As NETMF actually does not support TLS protocols newer than TLS 1.0, secure hppts connection to servers which only support the newer protocols actually are not possible.
This CodeShare entry shows an example where the Cobra III Mainbord after starting tries to list the files on its SD-Card, gets the actual time from the google NTP-Server and starts the NETMF TimeService.
On a button press the application loads the page https://www.google.de.

Edit: I'm sorry to tell that after posting the first version of this application I found a bug in the httpWebRequestWrapper Class. Certificates are not forwarded to the sslStream.AuthenticateAsClient method. This means that the identity of the addressed http server can not be guaranteed. I'll try to find a fix for this issue.

Comments or questions?   Discuss on the forum.



Author Version Date
RoSchmi 1 10/30 '16 at 08:45pm