mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream
Reviewed-by: xuelei, mullan
This commit is contained in:
parent
37107fc157
commit
0d0bd7bd40
50 changed files with 209 additions and 314 deletions
|
@ -26,7 +26,6 @@
|
|||
package sun.security.pkcs;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -525,7 +524,7 @@ public class PKCS9Attribute implements DerEncoder {
|
|||
* should be encoded as <code>T61String</code>s.
|
||||
*/
|
||||
@Override
|
||||
public void derEncode(OutputStream out) throws IOException {
|
||||
public void derEncode(DerOutputStream out) throws IOException {
|
||||
DerOutputStream temp = new DerOutputStream();
|
||||
temp.putOID(oid);
|
||||
switch (index) {
|
||||
|
@ -643,11 +642,7 @@ public class PKCS9Attribute implements DerEncoder {
|
|||
default: // can't happen
|
||||
}
|
||||
|
||||
DerOutputStream derOut = new DerOutputStream();
|
||||
derOut.write(DerValue.tag_Sequence, temp.toByteArray());
|
||||
|
||||
out.write(derOut.toByteArray());
|
||||
|
||||
out.write(DerValue.tag_Sequence, temp.toByteArray());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue