Remarkable SSL/TLS improvements in 2016 R1 PRE SDK, but

…still something breaks sometimes :cry:

We’re evaluating .NETMF AMQP(s) support using G120E with AmqpNETLite library ( [url]https://github.com/Azure/amqpnetlite[/url]).

Sending scenarios of “ServiceBus.EventHub.NetMF” test project work as expected, but receiving scenarios very often (but not always!) fail, with following exception stack trace:


Running scenario ‘receive without filter’, filter ‘’…
Establishing a connection…
Creating a session…
Creating a receiver link on partition 0…
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (9) ####
#### Message:
#### Microsoft.SPOT.Net.Security.SslNative::SecureRead [IP: 0000] ####
#### Microsoft.SPOT.Net.Security.SslStream::Read [IP: 0040] ####
#### Amqp.TcpTransport+SslSocket::Amqp.ITransport.Receive [IP: 0008] ####
#### Amqp.TcpTransport::Receive [IP: 000b] ####
#### Amqp.Framing.Reader::ReadBuffer [IP: 000b] ####
#### Amqp.Framing.Reader::ReadFrameBuffer [IP: 0008] ####
#### Amqp.Connection+Pump::PumpThread [IP: 0042] ####
#### SocketException ErrorCode = -1
Exception thrown: ‘System.Net.Sockets.SocketException’ in Microsoft.SPOT.Net.Security.dll
#### SocketException ErrorCode = -1
#### SocketException ErrorCode = -1
#### SocketException ErrorCode = -1
I/O: System.Net.Sockets.SocketException
The thread ‘’ (0x9) has exited with code 0 (0x0).
#### Exception Amqp.AmqpException - 0x00000000 (1) ####
#### Message: amqp:connection:forced
#### Amqp.Link::ThrowIfDetaching [IP: 0047] ####
#### Amqp.ReceiverLink::ReceiveInternal [IP: 0008] ####
#### Amqp.ReceiverLink::Receive [IP: 0007] ####
#### ServiceBus.Scenarios.EventHubsExample::ReceiveMessages [IP: 009f] ####
#### ServiceBus.Scenarios.EventHubsExample::ReceiveMessagesWithoutFilter [IP: 000b] ####
#### ServiceBus.Scenarios.EventHubsExample::Run [IP: 0027] ####
#### ServiceBus.EventHub.NetMF.Program::Main [IP: 0028] ####
Exception thrown: ‘Amqp.AmqpException’ in Amqp.NetMF.dll

Since this is a shared project, this test could be useful to debug (native) implementation of Microsoft.SPOT.Net.Security.SslNative::SecureRead() :smiley:

Thanks!