Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fefe4ba authored by Miguel Aranda's avatar Miguel Aranda Committed by Automerger Merge Worker
Browse files

Merge "Add systemProperty checking for updatable certs and modify tests." am: 042dc5fb

parents aefc0714 042dc5fb
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -39,9 +39,13 @@ public final class SystemCertificateSource extends DirectoryCertificateSource {
    }

    private static File getDirectory() {
        // TODO(miguelaranda): figure out correct code path.
        if ((System.getProperty("system.certs.enabled") != null)
                && (System.getProperty("system.certs.enabled")).equals("true")) {
            return new File(System.getenv("ANDROID_ROOT") + "/etc/security/cacerts");
        }
        File updatable_dir = new File("/apex/com.android.conscrypt/cacerts");
        if (updatable_dir.exists() && !(updatable_dir.list().length == 0)) {
        if (updatable_dir.exists()
                && !(updatable_dir.list().length == 0)) {
            return updatable_dir;
        }
        return new File(System.getenv("ANDROID_ROOT") + "/etc/security/cacerts");