8297065: DerOutputStream operations should not throw IOExceptions

Reviewed-by: mullan, valeriep
This commit is contained in:
Weijun Wang 2022-11-29 12:57:46 +00:00
parent d83a07b72c
commit 2deb318c9f
109 changed files with 725 additions and 1112 deletions

View file

@ -57,7 +57,7 @@ public class SubjectKeyIdentifierExtension extends Extension {
private KeyIdentifier id;
// Encode this extension value
private void encodeThis() throws IOException {
private void encodeThis() {
if (id == null) {
this.extensionValue = null;
return;
@ -72,8 +72,7 @@ public class SubjectKeyIdentifierExtension extends Extension {
* The criticality is set to False.
* @param octetString the octet string identifying the key identifier.
*/
public SubjectKeyIdentifierExtension(byte[] octetString)
throws IOException {
public SubjectKeyIdentifierExtension(byte[] octetString) {
id = new KeyIdentifier(octetString);
this.extensionId = PKIXExtensions.SubjectKey_Id;
@ -110,10 +109,9 @@ public class SubjectKeyIdentifierExtension extends Extension {
* Write the extension to the OutputStream.
*
* @param out the DerOutputStream to write the extension to.
* @exception IOException on encoding errors.
*/
@Override
public void encode(DerOutputStream out) throws IOException {
public void encode(DerOutputStream out) {
if (extensionValue == null) {
extensionId = PKIXExtensions.SubjectKey_Id;
critical = false;