Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASN1OutputStream constructor is private - use create() method #183

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class BouncyCastleUtil {
public static byte[] toByteArray(ASN1Primitive obj)
throws IOException {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
ASN1OutputStream der = new ASN1OutputStream(bout);
ASN1OutputStream der = ASN1OutputStream.create(bout);
der.writeObject(obj);
return bout.toByteArray();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static byte[] encodePrincipal(X500Principal subject) throws IOException {

public static byte[] encodePrincipal(X509Name subject) throws IOException {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
ASN1OutputStream der = new ASN1OutputStream(bout);
ASN1OutputStream der = ASN1OutputStream.create(bout);
der.writeObject(subject.toASN1Primitive());
return bout.toByteArray();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void testParseProxyCertInfo() throws Exception {


ByteArrayOutputStream bOut = new ByteArrayOutputStream();
ASN1OutputStream dOut = new ASN1OutputStream(bOut);
ASN1OutputStream dOut = ASN1OutputStream.create(bOut);
dOut.writeObject(info);

ByteArrayInputStream bIn =
Expand Down Expand Up @@ -105,7 +105,7 @@ public void testCreateProxyCertInfo2() throws Exception {
assertEquals(testOid, info.getProxyPolicy().getPolicyLanguage());

ByteArrayOutputStream bOut = new ByteArrayOutputStream();
ASN1OutputStream dOut = new ASN1OutputStream(bOut);
ASN1OutputStream dOut = ASN1OutputStream.create(bOut);
dOut.writeObject(info);

ByteArrayInputStream bIn =
Expand Down