Main Site Documentation

SSL Stream doesn't work on FEZ Spider


#1

Hello,

I develop application to connect Azure via Event Hub AMQP protocol on FEZ Spider by using Amqp .NET Lite library(https://amqpnetlite.codeplex.com/).

Until last week my application had worked and there was no problem but this week my application become not to work.
At current following exception happens.

#### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (31) ####
#### Message: 
#### Microsoft.SPOT.Net.Security.SslNative::SecureClientInit [IP: 0000] ####
#### Microsoft.SPOT.Net.Security.SslStream::Authenticate [IP: 0051] ####
#### Microsoft.SPOT.Net.Security.SslStream::AuthenticateAsClient [IP: 000c] ####
#### Microsoft.SPOT.Net.Security.SslStream::AuthenticateAsClient [IP: 000a] ####
#### Amqp.TcpTransport::Connect [IP: 00ba] ####
#### Amqp.Connection::Connect [IP: 0011] ####
#### Amqp.Connection::.ctor [IP: 000f] ####
#### SpiderAMQPSender.Program::AMQPCommWork [IP: 000c] ####

I thik that SSL doesn’t work on FEZ Spider firmware.
I’ve already tried “Update SSL Seeds” of FEZ Config but situation is same.

Why this happens ? and Are there any other ways to resolve this problem?


#2

@ hirosho - Which version of the SDK are you using? Can you try to update the SSL seed using MFDeploy?


#3

I use following version set.
.NET Micro Framework V4.3 SDK-R2-Beta
.NET Gadgeteer Core latest (uploaded Oct 3)
NETMF and Gadgeteer Package 2014 R5

and my code is…

        if (!ethernetJ11D.NetworkInterface.Opened)
            ethernetJ11D.NetworkInterface.Open();
        var ipAddr = ethernetJ11D.NetworkSettings.IPAddress;
        while (ipAddr == "0.0.0.0")
        {
            if (ethernetJ11D.NetworkSettings.IsDhcpEnabled)
            {
                ethernetJ11D.NetworkSettings.RenewDhcpLease();
            }
            else
            {
                ethernetJ11D.NetworkSettings.EnableDhcp();
            }
            Thread.Sleep(500);
            ipAddr = ethernetJ11D.NetworkSettings.IPAddress;
        }

        var request = HttpWebRequest.Create("https://www.facebook.com") as HttpWebRequest;
        using (var response = request.GetResponse() as HttpWebResponse)

then following exception happen
#### Exception System.NotSupportedException - CLR_E_NOT_SUPPORTED (1) ####
#### Message:
#### Microsoft.SPOT.Net.Security.SslNative::SecureClientInit [IP: 0000] ####
#### Microsoft.SPOT.Net.Security.SslStream::Authenticate [IP: 0051] ####
#### Microsoft.SPOT.Net.Security.SslStream::AuthenticateAsClient [IP: 000c] ####
#### System.Net.HttpWebRequest::EstablishConnection [IP: 0247] ####
#### System.Net.HttpWebRequest::SubmitRequest [IP: 0019] ####
#### System.Net.HttpWebRequest::GetResponse [IP: 000c] ####
#### GadgeteerAppFS_SSL.Program::ProgramStarted [IP: 0083] ####
#### GadgeteerAppFS_SSL.Program::Main [IP: 0015] ####
型 ‘System.NotSupportedException’ の初回例外が Microsoft.SPOT.Net.Security.dll で発生しました
型 ‘System.NotSupportedException’ の初回例外が System.Net.Security.dll で発生しました
#### Exception System.Net.WebException - 0x00000000 (1) ####
#### Message:
#### System.Net.HttpWebRequest::GetResponse [IP: 00d3] ####
#### GadgeteerAppFS_SSL.Program::ProgramStarted [IP: 0083] ####
#### GadgeteerAppFS_SSL.Program::Main [IP: 0015] ####
型 ‘System.Net.WebException’ の初回例外が System.Http.dll で発生しました
型 ‘System.Net.WebException’ のハンドルされていない例外が System.Http.dll で発生しました

sorry for some part is Japanese.
I added System.Http.dll and System.Net.Security.dll into reference of this project


#4

I tried to update SSL by MFDeploy and confirm that SSL works.

Thanks!