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 Merged-In: Iab2d3b23ad969f683d716cb981e32fd554c67a81 Change-Id: I9ed5c96a20d6749bf75212c0fd820d71ca0a6053
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user