mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8261779: JCK test api/javax_crypto/EncryptedPrivateKeyInfo/Ctor4.html is failing with assertion error when assertions enabled
Reviewed-by: rhalade, pkoppula, mschoene, weijun
This commit is contained in:
parent
2fcd920adc
commit
91b08b733e
2 changed files with 110 additions and 2 deletions
|
@ -118,7 +118,6 @@ public class AlgorithmId implements Serializable, DerEncoder {
|
|||
// initialized (which should not occur), or if it was
|
||||
// initialized with bogus parameters, which should have
|
||||
// been detected when init was called.
|
||||
assert false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +179,12 @@ public class AlgorithmId implements Serializable, DerEncoder {
|
|||
bytes.putOID(algid);
|
||||
// Setup params from algParams since no DER encoding is given
|
||||
if (constructedFromDer == false) {
|
||||
if (encodedParams != null) {
|
||||
if (algParams != null) {
|
||||
if (encodedParams == null) {
|
||||
// call getEncoded again in case algParams were initialized
|
||||
// after being passed in to ctor.
|
||||
encodedParams = algParams.getEncoded();
|
||||
}
|
||||
params = new DerValue(encodedParams);
|
||||
} else {
|
||||
params = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue