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 Error


  • Please log in to reply
6 replies to this topic

#1 bradygaster

bradygaster

    Member

  • Members
  • PipPip
  • 15 posts

Posted 12 May 2015 - 06:44 AM

I had some sample code up and running in no time tonight with my brand new Netduino 3. Was super-simple to get running a basic loop-and-request sample. Then, I hit a snag. 

 

I'm trying to call a basic REST API (a Web API, actually) that returns a simple string in JSON. The endpoint is an HTTPS endpoint. I've called an HTTP endpoint without any issue, but as soon as I change the URL I'm hitting to be the "real" one I want to hit, which is HTTPS, the code fails. 

 

Is HTTPS not supported on Netduino/NETMF? I found another forum post that said it wasn't supported but it was old, so I'd hoped Netduino 3 has HTTPS support. 

 

Thanks in advance!



#2 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 12 May 2015 - 07:27 AM

Is HTTPS not supported on Netduino/NETMF? I found another forum post that said it wasn't supported but it was old, so I'd hoped Netduino 3 has HTTPS support. 

 

I managed to log data to Sparkfun's Phant service using SSL over the weekend with no problems.  I did not hit the service hard, I think I only logged about 30-40 entries, 1 per 10 seconds when it was running, but it worked with no problems for me.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#3 Robert Hugo

Robert Hugo

    Advanced Member

  • Members
  • PipPipPip
  • 35 posts

Posted 12 May 2015 - 12:16 PM

Just FYI, Nevyn posted code (thank you for sharing) that you can find it under the title "Temperature Logging" in the "Netduino 3" forum.



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 12 May 2015 - 05:09 PM

Hi Brady,

HTTPS is baked into the CC3100 on Netduino 3 Wi-Fi. What exception did you get when you tried to connect (and what is the exception's error code?)

CC3100 supports modern SSL standards (SSL 3.0 and TLS 1.2) using an industry-proven SSL stack so it should work well; if there's an issue with a particular HTTPS server we can dig in with TI and debug :)

Chris

#5 foxxjnm

foxxjnm

    New Member

  • Members
  • Pip
  • 5 posts

Posted 21 May 2015 - 12:05 AM

Seeing the same issue as Brady. When trying to hit a test WebAPI I have sitting on Azure I get the following stack trace:
 
Microsoft.SPOT.Net.Security.SslStream::Authenticate
Microsoft.SPOT.Net.Security.SslStream::AuthenticateAsClient
System.Net.HttpWebRequest::EstablishConnection
System.Net.HttpWebRequest::SubmitRequest
System.Net.HttpWebRequest::GetResponse
NetduinoSensorBaseStation.Program::Main
 
When I hit an API without SSL all is right in the world. Non ssl -> http://jsonplacehold...ode.com/posts/1
Chris DM me for the Azure address if you'd like to test against it.


#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 May 2015 - 12:31 AM

Hi foxxjnm,

You have DM :)

Also...what exception (and error code) do you get? Is this just basic SSL/TLS authentication?

A lot of community members are using Netduino 3 Wi-Fi and HTTPS using Azure without a hitch--so I'm really interested to see what's happening here. [And if there's some edge case that needs to be fixed in the CC3100 firmware, we'll pull in TI.]

Thanks foxxjnm,

Chris

#7 KiwiDev

KiwiDev

    Advanced Member

  • Members
  • PipPipPip
  • 100 posts
  • LocationNew Zealand

Posted 21 May 2015 - 06:39 AM

Hi foxxjnm

 

When I go to the URL in the post above in a desktop browser

 

jsonplaceholder.typicode.com

 

I get an error indicating that the url doesn't match the server certificate

 

*.herokuapp.com

 

What happens if you use this endpoint instead?

 

jsonplaceholder.herokuapp.com

 

Possible server cert missing/incorrectly configured?

 

@KiwiBryn

blog.devmobile.co.nz






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.