congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AdvancedX509TrustManager.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.owncloud.android.lib.common.network.AdvancedX509TrustManager
constructor

Best Java code snippets using com.owncloud.android.lib.common.network.AdvancedX509TrustManager.<init> (Showing top 2 results out of 315)

origin: nextcloud/android-library

public static AdvancedSslSocketFactory getAdvancedSslSocketFactory(Context context) 
    throws GeneralSecurityException, IOException {
  if (mAdvancedSslSocketFactory  == null) {
    KeyStore trustStore = getKnownServersStore(context);
    AdvancedX509TrustManager trustMgr = new AdvancedX509TrustManager(trustStore);
    TrustManager[] tms = new TrustManager[] { trustMgr };
      
    SSLContext sslContext;
    try {
      sslContext = SSLContext.getInstance("TLSv1.2");
    } catch (NoSuchAlgorithmException e) {
      Log_OC.w(TAG, "TLSv1.2 is not supported in this device; falling through TLSv1.0");
      sslContext = SSLContext.getInstance("TLSv1");
      // should be available in any device; see reference of supported protocols in 
      // http://developer.android.com/reference/javax/net/ssl/SSLSocket.html
    }
    sslContext.init(null, tms, null);
        
    mHostnameVerifier = new BrowserCompatHostnameVerifier();
    mAdvancedSslSocketFactory = new AdvancedSslSocketFactory(sslContext, trustMgr, mHostnameVerifier);
  }
  return mAdvancedSslSocketFactory;
}
origin: owncloud/android-library

public static OkHttpClient getOkHttpClient() {
  if (sOkHttpClient == null) {
    try {
      final X509TrustManager trustManager = new AdvancedX509TrustManager(
          NetworkUtils.getKnownServersStore(sContext));
      final SSLContext sslContext = SSLContext.getInstance("TLS");
com.owncloud.android.lib.common.networkAdvancedX509TrustManager<init>

Javadoc

Constructor for AdvancedX509TrustManager

Popular methods of AdvancedX509TrustManager

  • findX509TrustManager
    Locates the first X509TrustManager provided by a given TrustManagerFactory
  • isKnownServer

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • putExtra (Intent)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now