HTTPS support on N+2? - Netduino Plus 2 (and Netduino Plus 1) - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

HTTPS support on N+2?


  • Please log in to reply
5 replies to this topic

#1 pounce

pounce

    Member

  • Members
  • PipPip
  • 12 posts

Posted 20 November 2012 - 09:05 PM

Is HTTPS supported on N+2? It came up in another thread on the board, but I'm wondering if with the new hardware its possible to use HTTPS for restful or other services located across the network. Thanks!

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 November 2012 - 12:16 AM

Hi pounce,

Is HTTPS supported on N+2? It came up in another thread on the board, but I'm wondering if with the new hardware its possible to use HTTPS for restful or other services located across the network.

OpenSSL is pretty large, so I don't think it will fit. But I've learned to never say never :) One of our enterprising community members may find a way to make it work.

There are some smaller SSL stacks, albeit not open source ones, that could be integrated for commercial projects using Netduino Plus 2.

Chris

Edited by Chris Walker, 21 November 2012 - 03:02 PM.
corrected typo -- thanks cuno!


#3 pounce

pounce

    Member

  • Members
  • PipPip
  • 12 posts

Posted 21 November 2012 - 01:22 AM

Thanks, Chris. If it becomes a critical need I can look at the GHI solutions that support SSL. Would definitely like to see it in your solutions someday :)

#4 Nobby

Nobby

    Advanced Member

  • Members
  • PipPipPip
  • 70 posts

Posted 21 November 2012 - 06:41 AM

I was about to start prototyping code in my existing product to use SSL for client authentication. Haven't written I line of code yet but I've read through the framework API for supported functionality. http://msdn.microsof...y/hh401316.aspx is where most of what you need can be read. I'm not sure if this component of the .Net Microframework is part of the build for Netduinos.

The basic run-down is that your device can be a client or a server as far as SSL is concerned so technically you can pull off HTTPs. If you're using basic HTTPS then you only need to store one or two certificates. One to certify your netduino as a secure server and possibly another certificate/cert chain that points to a publicly trusted certification authority(CA). If you don't care about the certificate being trusted and you just want secure communications it's pretty simple.

  • Generate and store the SSL certificate for your netduino into RAM at run-time via the CertificateStore class. Put the cert on an SD card and read it off each time you boot up
  • Use the SSLStream class for reading and writing data instead of a NetworkStream with the client socket.
  • Server authentication via the netduino certificate is mandatory but client authentication with a separate certificate is optional. Use the SSLStream.AuthenticateAsClient and AuthenticateAsServer functions.
  • Once authenticated, you use the streams like normal HTTP


#5 Cuno

Cuno

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts
  • LocationZürich / Switzerland

Posted 21 November 2012 - 11:28 AM

There are some smaller TCP stacks, albeit not open source ones, that could be integrated for commercial projects using Netduino Plus 2.

You mean SSL stacks? Polar SSL and Matrix SSL are small dual-licensed open source SSL stacks:

http://www.matrixssl.org/
https://polarssl.org/

I don't really know either one, but they appear like good candidates for integration into NETMF (not Apache 2.0 licensed, though). If anyone has experience with that, I'd be very interested.

Cuno

PS
Open SSL indeed seems an order of magnitude too large for Netduino Plus 2 or similar boards.

PPS
It would be particularly interesting to learn about the speed of these generic stacks. SSL stacks not tuned for a particular microcontroller may be very slow (e.g., taking more than a minute for opening a connection).

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 November 2012 - 03:03 PM

You mean SSL stacks? Polar SSL and Matrix SSL are small dual-licensed open source SSL stacks:

Doh! Yes, SSL :) Fixed.

BTW, thanks for the additional notes on SSL stacks. I really wish we could find an open source one to squeeze in... Would be awesome.

Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.