"Failed to set secure channel for SSL / TLS" in .NET CF application on smartphone

I have a problem with stubborn communication with an application running on the .NET Compact Framework 3.5 on Windows Mobile smartphones.

I am creating a web request using this code:

UTF8Encoding encoding = new System.Text.UTF8Encoding();
byte[] Data = encoding.GetBytes(HttpUtility.ConstructQueryString(parameters));
httpRequest = WebRequest.Create((domain)) as HttpWebRequest;
httpRequest.Timeout = 10000000;
httpRequest.ReadWriteTimeout = 10000000;
httpRequest.Credentials = CredentialCache.DefaultCredentials;
httpRequest.Method = "POST";
httpRequest.ContentType = "application/x-www-form-urlencoded";
httpRequest.ContentLength = Data.Length;
Stream SendReq = httpRequest.GetRequestStream();
SendReq.Write(Data, 0, Data.Length);
SendReq.Close();
HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse();
return httpResponse.GetResponseStream();

Web service functions by getting a JSON encoded document as part of the URL (for example, https://site.com/ws/sync??document= {"version": "1.0.0", "items": [{ "item_1": "item1"}]} & user = usr & password = pw), and as the response receives another JSON document as response data.

WM 5 6. , Treo ( Sprint). AT & T ( DeviceAnywhere), , .

- , , , .

, :

System.Net.WebException
SSL/TLS
: System.Net.HttpWebRequest.finishGetRequestStream()
  System.Net.HttpWebRequest.GetRequestStream()
  OurApp.GetResponseStream( String, Hashtable)

:
System.IO.IOException
, .
: System.Net.SslConnectionState.ClientSideHandshake()
  System.Net.SslConnectionState.PerformClientHandShake()
  System.Net.Connection.connect( )
  System.Threading.ThreadPool.WorkItem.doWork(Object o)
  System.Threading.Timer.ring()

Apache IP- - , . , Apache Linux TurboGears Python.

CA . , , , ( ) GeoTrust, , .

- SSL-, .

, , ( "" ), , , .

: ActiveSync, GPRS .

!

+3
1

Tomcat.

SSLProtocol = "all" Tomcat Connector (server.xml).

Tomcat SSL How-To, SSLProtocol = "TLSv1". IE , .Net Compact Framework 3.5.

0

Source: https://habr.com/ru/post/1713898/


All Articles