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

Commit b81181b9 authored by Neil Fuller's avatar Neil Fuller
Browse files

Avoid deprecated PrivateKeyInfo.getAlgorithmId()

Switch from using the PrivateKeyInfo.getAlgorithmId() method to
using the functionally identical PrivateKeyInfo.getPrivateKeyAlgorithm()
method instead.

Bug: 113148576
Test: build only / inspection
Change-Id: Iab2d3b23ad969f683d716cb981e32fd554c67a81
parent aa8f8fb4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ public final class CredentialStorage extends FragmentActivity {
        try {
            final ASN1InputStream bIn = new ASN1InputStream(new ByteArrayInputStream(keyData));
            final PrivateKeyInfo pki = PrivateKeyInfo.getInstance(bIn.readObject());
            final String algOid = pki.getAlgorithmId().getAlgorithm().getId();
            final String algOid = pki.getPrivateKeyAlgorithm().getAlgorithm().getId();
            final String algName = new AlgorithmId(new ObjectIdentifier(algOid)).getName();

            return KeyChain.isBoundKeyAlgorithm(algName);