Android Open Source - devoxx-2013-android-app-security Trust All Trust Manager






From Project

Back to project page devoxx-2013-android-app-security.

License

The source code is released under:

Apache License

If you think the Android project devoxx-2013-android-app-security listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package be.idamf.android.tamperdetection.pinning;
/*from w  ww  .  j av a 2  s .c o m*/
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import javax.net.ssl.X509TrustManager;

/**
 * Don't use an X509TrustManager that accepts all certificates.
 */
public class TrustAllTrustManager implements X509TrustManager {
    @Override
    public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
        // trust all!
    }

    @Override
    public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
        // trust all!
    }

    @Override
    public X509Certificate[] getAcceptedIssuers() {
        return null;
    }
}




Java Source Code List

be.idamf.android.tamperdetection.MainActivity.java
be.idamf.android.tamperdetection.data.PublicKeyInfo.java
be.idamf.android.tamperdetection.pinning.TrustAllTrustManager.java
be.idamf.android.tamperdetection.task.EnvironmentChecker.java
be.idamf.android.tamperdetection.task.RootDetector.java
be.idamf.android.tamperdetection.ui.EnvironmentCheckFragment.java
be.idamf.android.tamperdetection.ui.NetworkCheckFragment.java
be.idamf.android.tamperdetection.ui.RootCheckFragment.java
be.idamf.android.tamperdetection.util.ExecShell.java
be.idamf.android.tamperdetection.util.RootDetectionUtils.java
be.idamf.android.tamperdetection.util.TamperDetectionUtils.java