8281388: Change wrapping of EncryptedPrivateKeyInfo

Reviewed-by: jnimeh
This commit is contained in:
Anthony Scarpino 2022-02-08 20:26:26 +00:00 committed by Henry Jen
parent 9e051d5396
commit f61d121124

View File

@ -83,12 +83,12 @@ public class EncryptedPrivateKeyInfo {
"must be non-null");
}
DerValue val = new DerValue(encoded);
this.encoded = encoded.clone();
DerValue val = DerValue.wrap(this.encoded);
if (val.tag != DerValue.tag_Sequence) {
throw new IOException("DER header error: no SEQ tag");
}
this.encoded = encoded.clone();
DerValue[] seq = new DerValue[2];
seq[0] = val.data.getDerValue();