8234042: Better factory production of certificates

Reviewed-by: weijun, rhalade, mschoene
This commit is contained in:
Sean Mullan 2020-01-17 08:04:14 -05:00
parent 1bfcf768f5
commit da6daad2e5
7 changed files with 44 additions and 5 deletions

View file

@ -215,6 +215,9 @@ public final class KeychainStore extends KeyStoreSpi {
// Get the Algorithm ID next
DerValue[] value = in.getSequence(2);
if (value.length < 1 || value.length > 2) {
throw new IOException("Invalid length for AlgorithmIdentifier");
}
AlgorithmId algId = new AlgorithmId(value[0].getOID());
String algName = algId.getName();