From fe4e4cb234d992b9c8d6e695270a19b20b609689 Mon Sep 17 00:00:00 2001 From: adam Date: Wed, 14 Apr 2004 21:13:51 +0000 Subject: [PATCH] another gcj hack darcs-hash:20040414211351-5007d-69d5297d606a56747c4a42f4f0ba3f568be5fca0.gz --- src/org/ibex/crypto/X509.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/ibex/crypto/X509.java b/src/org/ibex/crypto/X509.java index c283aaf..3c4abde 100644 --- a/src/org/ibex/crypto/X509.java +++ b/src/org/ibex/crypto/X509.java @@ -67,11 +67,11 @@ public class X509 { public Certificate(InputStream is) throws IOException { int i; RecordingInputStream certIS = new RecordingInputStream(is); - DER.InputStream certSequence = new DER.InputStream(certIS).getSequenceStream(); + DER.InputStream certSequence = DER.InputStream.New(certIS).getSequenceStream(); RecordingInputStream tbsCertIS = new RecordingInputStream(certSequence); try { - Vector tbsSequence = (Vector) new DER.InputStream(tbsCertIS).readObject(); + Vector tbsSequence = (Vector) DER.InputStream.New(tbsCertIS).readObject(); tbsCertBytes = tbsCertIS.getBytes(); signatureAlgorithm = new AlgorithmIdentifier(certSequence.readObject()); signature = (DER.BitString) certSequence.readObject(); @@ -120,7 +120,7 @@ public class X509 { String oid = (String) extension.elementAt(0); byte[] data = (byte[]) extension.elementAt(extension.size()-1); if(oid.equals(BASIC_CONSTRAINTS)) - bc = new BC(new DER.InputStream(new ByteArrayInputStream(data)).readObject()); + bc = new BC(DER.InputStream.New(new ByteArrayInputStream(data)).readObject()); } } basicContraints = bc; @@ -143,7 +143,7 @@ public class X509 { public RSA.PublicKey getRSAPublicKey() throws DER.Exception { if(!RSA_ENCRYPTION.equals(publicKeyAlgorithm.id)) throw new DER.Exception("This isn't an RSA public key"); try { - return new RSA.PublicKey(new DER.InputStream(new ByteArrayInputStream(publicKey.data)).readObject()); + return new RSA.PublicKey(DER.InputStream.New(new ByteArrayInputStream(publicKey.data)).readObject()); } catch(IOException e) { throw new DER.Exception(e.getMessage()); } catch(RuntimeException e) { @@ -165,7 +165,7 @@ public class X509 { PKCS1 pkcs1 = new PKCS1(new RSA(rsapk.modulus,rsapk.exponent,true)); byte[] d = pkcs1.decode(signature.data); - Vector v = (Vector) new DER.InputStream(new ByteArrayInputStream(d)).readObject(); + Vector v = (Vector) DER.InputStream.New(new ByteArrayInputStream(d)).readObject(); byte[] signedDigest = (byte[]) v.elementAt(1); if(signedDigest.length != digest.getDigestSize()) return false; -- 1.7.10.4