mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +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
|
@ -436,18 +436,6 @@ public class PKCS7 {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the signed data to an output stream.
|
||||
*
|
||||
* @param out the output stream to write the encoded data to.
|
||||
* @exception IOException on encoding errors.
|
||||
*/
|
||||
public void encodeSignedData(OutputStream out) throws IOException {
|
||||
DerOutputStream derout = new DerOutputStream();
|
||||
encodeSignedData(derout);
|
||||
out.write(derout.toByteArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* Encodes the signed data to a DerOutputStream.
|
||||
*
|
||||
|
@ -850,7 +838,7 @@ public class PKCS7 {
|
|||
: new ContentInfo(content);
|
||||
PKCS7 pkcs7 = new PKCS7(algorithms, contentInfo,
|
||||
signerChain, signerInfos);
|
||||
ByteArrayOutputStream p7out = new ByteArrayOutputStream();
|
||||
DerOutputStream p7out = new DerOutputStream();
|
||||
pkcs7.encodeSignedData(p7out);
|
||||
|
||||
return p7out.toByteArray();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue