diff --git a/ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java b/ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java index 4a154335..c99a6e27 100644 --- a/ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java +++ b/ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java @@ -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(); } diff --git a/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateIOUtil.java b/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateIOUtil.java index 4cff1c53..643f3972 100644 --- a/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateIOUtil.java +++ b/ssl-proxies/src/main/java/org/globus/gsi/util/CertificateIOUtil.java @@ -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(); } diff --git a/ssl-proxies/src/test/java/org/globus/gsi/proxy/ext/ProxyCertInfoTest.java b/ssl-proxies/src/test/java/org/globus/gsi/proxy/ext/ProxyCertInfoTest.java index 82ecdfd8..5806ac2e 100644 --- a/ssl-proxies/src/test/java/org/globus/gsi/proxy/ext/ProxyCertInfoTest.java +++ b/ssl-proxies/src/test/java/org/globus/gsi/proxy/ext/ProxyCertInfoTest.java @@ -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 = @@ -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 =