How to Implement TLSv1.3 in Applications: Difference between revisions

From wizarPOS
No edit summary
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/other-development/implement-tlsv1.3}}")
Tag: Replaced
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== References ==
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/other-development/implement-tlsv1.3}}
[https://github.com/google/conscrypt GitHub project]
 
[https://source.android.google.cn/devices/architecture/modular-system/conscrypt?hl=zh-cn#conscrypt-format Resouces]
 
== Sample ==
Snippet Code:
<syntaxhighlight lang="java">
  Provider conscrypt = Conscrypt.newProvider();
  // Add as provider
  Security.insertProviderAt(conscrypt, 1);
  SSLContext context = SSLContext.getInstance("TLSv1.3");
 
  context.init(null/*keyManagers*/, null /*new CtsTrustManager[] {trustManager}*/, null);
  SSLSocketFactory factory = context.getSocketFactory();
  URL sslURL = new URL("https://www.vpslala.com/");
  HttpsURLConnection con = (HttpsURLConnection) sslURL.openConnection();
  con.setSSLSocketFactory(factory);
  Log.d("SQLTest", "SQLTestTLS13. "+con.getResponseMessage());
</syntaxhighlight >

Latest revision as of 03:28, 8 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/other-development/implement-tlsv1.3

We're making a move! Our site's content is migrating to a new URL, to provide you with an enhanced browsing experience. Please update your bookmarks accordingly. Thank you for your continuous support!