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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 1922, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -26,7 +26,6 @@
|
|||
package sun.security.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
* Interface to an object that knows how to write its own DER
|
||||
|
@ -41,7 +40,7 @@ public interface DerEncoder {
|
|||
*
|
||||
* @param out the stream on which the DER encoding is written.
|
||||
*/
|
||||
void derEncode(OutputStream out)
|
||||
void derEncode(DerOutputStream out)
|
||||
throws IOException;
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,6 @@ package sun.security.util;
|
|||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.charset.Charset;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -583,7 +582,7 @@ extends ByteArrayOutputStream implements DerEncoder {
|
|||
*
|
||||
* @exception IOException on output error.
|
||||
*/
|
||||
public void derEncode(OutputStream out) throws IOException {
|
||||
public void derEncode(DerOutputStream out) throws IOException {
|
||||
out.write(toByteArray());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue