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

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

am 3795f510: am 76e69417: am 8ab76778: Merge "KeyChain: return null instead of throw"

# Via Android Git Automerger (2) and others
* commit '3795f510':
  KeyChain: return null instead of throw
parents f09a2975 3795f510
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));