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

Oct. 30, 2016   |   Project   |   Licensed as Apache 2.0   |   1338 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

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