mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8234042: Better factory production of certificates
Reviewed-by: weijun, rhalade, mschoene
This commit is contained in:
parent
1bfcf768f5
commit
da6daad2e5
7 changed files with 44 additions and 5 deletions
|
@ -254,6 +254,9 @@ public final class PKCS12Attribute implements KeyStore.Entry.Attribute {
|
|||
private void parse(byte[] encoded) throws IOException {
|
||||
DerInputStream attributeValue = new DerInputStream(encoded);
|
||||
DerValue[] attrSeq = attributeValue.getSequence(2);
|
||||
if (attrSeq.length != 2) {
|
||||
throw new IOException("Invalid length for PKCS12Attribute");
|
||||
}
|
||||
ObjectIdentifier type = attrSeq[0].getOID();
|
||||
DerInputStream attrContent =
|
||||
new DerInputStream(attrSeq[1].toByteArray());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue