mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8297065: DerOutputStream operations should not throw IOExceptions
Reviewed-by: mullan, valeriep
This commit is contained in:
parent
d83a07b72c
commit
2deb318c9f
109 changed files with 725 additions and 1112 deletions
|
@ -126,19 +126,14 @@ public final class RSAPublicKeyImpl extends X509Key implements RSAPublicKey {
|
|||
this.type = type;
|
||||
this.keyParams = keyParams;
|
||||
|
||||
try {
|
||||
// generate the key encoding
|
||||
DerOutputStream out = new DerOutputStream();
|
||||
out.putInteger(n);
|
||||
out.putInteger(e);
|
||||
byte[] keyArray =
|
||||
// generate the key encoding
|
||||
DerOutputStream out = new DerOutputStream();
|
||||
out.putInteger(n);
|
||||
out.putInteger(e);
|
||||
byte[] keyArray =
|
||||
new DerValue(DerValue.tag_Sequence,
|
||||
out.toByteArray()).toByteArray();
|
||||
setKey(new BitArray(keyArray.length*8, keyArray));
|
||||
} catch (IOException exc) {
|
||||
// should never occur
|
||||
throw new InvalidKeyException(exc);
|
||||
}
|
||||
out.toByteArray()).toByteArray();
|
||||
setKey(new BitArray(keyArray.length * 8, keyArray));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue