Merge "Avoid deprecated PrivateKeyInfo.getAlgorithmId()"

am: a934366a8d

Change-Id: If44a79fde1e2694dc24d09cbf889771facef751f
This commit is contained in:
Neil Fuller
2018-10-03 00:26:56 -07:00
committed by android-build-merger

View File

@@ -218,7 +218,7 @@ public final class CredentialStorage extends Activity {
try { try {
ASN1InputStream bIn = new ASN1InputStream(new ByteArrayInputStream(keyData)); ASN1InputStream bIn = new ASN1InputStream(new ByteArrayInputStream(keyData));
PrivateKeyInfo pki = PrivateKeyInfo.getInstance(bIn.readObject()); PrivateKeyInfo pki = PrivateKeyInfo.getInstance(bIn.readObject());
String algOid = pki.getAlgorithmId().getAlgorithm().getId(); String algOid = pki.getPrivateKeyAlgorithm().getAlgorithm().getId();
String algName = new AlgorithmId(new ObjectIdentifier(algOid)).getName(); String algName = new AlgorithmId(new ObjectIdentifier(algOid)).getName();
return KeyChain.isBoundKeyAlgorithm(algName); return KeyChain.isBoundKeyAlgorithm(algName);