Error TLS connection

We had difficulties connecting https to remote computers (for example, PayPal vb.), Which disconnected the SSL3 protocol from our .Net application. We get the following exception in the GetResponse method of the HttpWebRequest instance.

The request was aborted: Failed to create a secure SSL / TLS channel.

When we go over the network and track network logs using WireShark, we see that the remote machine returns the following error

TLSv1.2 Alert (Level: Fatal, Description: Communication Acknowledge Error) Communication Error 40

A more interesting situation is when I try to enter the PayPal address in an Internet browser, it can successfully open the page, which means that the connection can be established. We also try to connect to the OpenSSL command tool, the result is successfully connected again.

When we compare WireShark logs from InternetExplorer and .Net applications, we can see that Internet Explorer sends more available cipher suites than the .Net application, and PayPal selects the next cipher that is not in the requests of .Net applications.

TLS_RSA_WITH_RC4_128_SHA

Logs from WireShark are picked up:

ServerMachine: .Net Application Client Hello .Net application client HelloServerMachine: .Net Application Server Response .Net application server responseServerMachine: InternetExplorer Client Hello IE Client HelloServerMachine: InternetExplorer Server Hello IE Server Hello

, . DevMachine:.Net Hello .Net application Client Hello on dev enviroment DevMachine:.Net application Server Hello .Net application server Hello on dev enviroment

, PayPal Cipher Suites, " Hello" .Net.

, , Windows 2008 R2, Windows Server 2008 R2 Windows 8.

, , .

# PayPal api.

HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("https://api-3t.sandbox.paypal.com/2.0/");

wr.Method = "POST";
wr.ContentType = "application/x-www-form-urlencoded";


string output = null;
try
{
    WebResponse wres = wr.GetResponse();
    Stream ress = wres.GetResponseStream();
    StreamReader ressr = new StreamReader(ress, Encoding.UTF8);
    output = ressr.ReadToEnd();
}
catch (System.Net.WebException webEx)
{
    if (webEx.Response != null)
    {
        WebResponse wres = webEx.Response;
        Stream ress = wres.GetResponseStream();
        StreamReader ressr = new StreamReader(ress);
        output = ressr.ReadToEnd();
    }
    else
        throw webEx;

}
catch (Exception ex)
{
    throw ex;
}

+4
1

, PayPal Cipher Suites, " Hello" .Net.

. ssllabs, , api-3t.sandbox.paypal.com RC4-SHA (TLS_RSA_WITH_RC4_128_SHA), .

, , Windows 2008 R2

, RC4-SHA, . . Microsoft Technet , , , .

+3
source

All Articles