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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user