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

Commit 81f532c9 authored by Miguel's avatar Miguel Committed by Miguel Aranda
Browse files

Only use concscrypt certs if directory is nonempty

Test: atest TrustedCertificateStoreTest
Bug: 264540110
Change-Id: I5ac47315d3e9cfacb53d27080046a3fd8cfb7878
parent 15bc01b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ public final class SystemCertificateSource extends DirectoryCertificateSource {
    private static File getDirectory() {
        // TODO(miguelaranda): figure out correct code path.
        File updatable_dir = new File("/apex/com.android.conscrypt/cacerts");
        if (updatable_dir.exists()) {
        if (updatable_dir.exists() && !(updatable_dir.list().length == 0)) {
            return updatable_dir;
        }
        return new File(System.getenv("ANDROID_ROOT") + "/etc/security/cacerts");