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

Commit 76e69417 authored by Kenny Root's avatar Kenny Root Committed by Android Git Automerger
Browse files

am 8ab76778: Merge "KeyChain: return null instead of throw"

# Via Gerrit Code Review (1) and Kenny Root (1)
* commit '8ab76778':
  KeyChain: return null instead of throw
parents 9b0aa6c9 8ab76778
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -336,7 +336,12 @@ public final class KeyChain {
        KeyChainConnection keyChainConnection = bind(context);
        try {
            IKeyChainService keyChainService = keyChainConnection.getService();
            byte[] certificateBytes = keyChainService.getCertificate(alias);

            final byte[] certificateBytes = keyChainService.getCertificate(alias);
            if (certificateBytes == null) {
                return null;
            }

            TrustedCertificateStore store = new TrustedCertificateStore();
            List<X509Certificate> chain = store
                    .getCertificateChain(toCertificate(certificateBytes));