Package org.apache.geronimo.util.asn1

Examples of org.apache.geronimo.util.asn1.ASN1OutputStream.writeObject()


           
            TBSCertificateStructure     tbs = gen.generateTBSCertificate();
            ByteArrayOutputStream       bOut = new ByteArrayOutputStream();
            ASN1OutputStream            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(tbs);
           
            if (!isSameAs(bOut.toByteArray(), v1Cert))
            {
                return new SimpleTestResult(false, getName() + ": failed v1 cert generation");
            }
View Full Code Here


            DERObject       o = aIn.readObject();
           
            bOut = new ByteArrayOutputStream();
            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(o);
           
            if (!isSameAs(bOut.toByteArray(), v2CertList))
            {
                return new SimpleTestResult(false, getName() + ": failed v1 cert read back test");
            }
View Full Code Here

           
            TBSCertificateStructure     tbs = gen.generateTBSCertificate();
            ByteArrayOutputStream       bOut = new ByteArrayOutputStream();
            ASN1OutputStream            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(tbs);
           
            if (!isSameAs(bOut.toByteArray(), v3Cert))
            {
                return new SimpleTestResult(false, getName() + ": failed v3 cert generation");
            }
View Full Code Here

            DERObject       o = aIn.readObject();
           
            bOut = new ByteArrayOutputStream();
            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(o);
           
            if (!isSameAs(bOut.toByteArray(), v2CertList))
            {
                return new SimpleTestResult(false, getName() + ": failed v3 cert read back test");
            }
View Full Code Here

           
            TBSCertList                 tbs = gen.generateTBSCertList();
            ByteArrayOutputStream       bOut = new ByteArrayOutputStream();
            ASN1OutputStream            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(tbs);
           
            if (!isSameAs(bOut.toByteArray(), v2CertList))
            {
                return new SimpleTestResult(false, getName() + ": failed v2 cert list generation");
            }
View Full Code Here

            DERObject       o = aIn.readObject();
           
            bOut = new ByteArrayOutputStream();
            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(o);
           
            if (!isSameAs(bOut.toByteArray(), v2CertList))
            {
                return new SimpleTestResult(false, getName() + ": failed v2 cert list read back test");
            }
View Full Code Here

            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
            ASN1OutputStream        aOut = new ASN1OutputStream(bOut);
           
            for (int i = 0; i != values.length; i++)
            {
                aOut.writeObject(values[i]);
            }
           
            DERObject[] readValues = new DERObject[values.length];
           
            if (!isSameAs(bOut.toByteArray(), data))
View Full Code Here

    {
        DERObjectIdentifier     o = new DERObjectIdentifier(oid);
        ByteArrayOutputStream   bOut = new ByteArrayOutputStream();
        ASN1OutputStream        aOut = new ASN1OutputStream(bOut);
       
        aOut.writeObject(o);
       
        ByteArrayInputStream    bIn = new ByteArrayInputStream(bOut.toByteArray());
        ASN1InputStream         aIn = new ASN1InputStream(bIn);
       
        o = (DERObjectIdentifier)aIn.readObject();
View Full Code Here

            else
                digest = sig.sign();
            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();

            ASN1OutputStream dout = new ASN1OutputStream(bOut);
            dout.writeObject(new DEROctetString(digest));
            dout.close();

            return bOut.toByteArray();
        }
        catch (Exception e) {
View Full Code Here

            whole.add(new DERTaggedObject(0, new DERSequence(body)));

            ByteArrayOutputStream   bOut = new ByteArrayOutputStream();

            ASN1OutputStream dout = new ASN1OutputStream(bOut);
            dout.writeObject(new DERSequence(whole));
            dout.close();

            return bOut.toByteArray();
        }
        catch (Exception e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.