Package org.apache.commons.ssl.asn1

Examples of org.apache.commons.ssl.asn1.DERObject


        ASN1EncodableVector v = new ASN1EncodableVector();
        Enumeration         e = usages.elements();

        while (e.hasMoreElements())
        {
            DERObject  o = (DERObject)e.nextElement();

            v.add(o);
            this.usageTable.put(o, o);
        }
View Full Code Here


        {
            return new SimpleTestResult(false, getName() + ": failed public named generation");
        }
       
        ASN1InputStream         aIn = new ASN1InputStream(new ByteArrayInputStream(namedPub));
        DERObject               o = aIn.readObject();
       
        if (!info.equals(o))
        {
            return new SimpleTestResult(false, getName() + ": failed public named equality");
        }
View Full Code Here

        {
            return new SimpleTestResult(false, getName() + ": failed private named generation");
        }
       
        ASN1InputStream         aIn = new ASN1InputStream(new ByteArrayInputStream(namedPriv));
        DERObject               o = aIn.readObject();
       
        if (!info.equals(o))
        {
            return new SimpleTestResult(false, getName() + ": failed private named equality");
        }
View Full Code Here

           
            //
            // read back test
            //
            ASN1InputStream aIn = new ASN1InputStream(new ByteArrayInputStream(v2CertList));
            DERObject       o = aIn.readObject();
           
            bOut = new ByteArrayOutputStream();
            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(o);
View Full Code Here

           
            //
            // read back test
            //
            ASN1InputStream aIn = new ASN1InputStream(new ByteArrayInputStream(v2CertList));
            DERObject       o = aIn.readObject();
           
            bOut = new ByteArrayOutputStream();
            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(o);
View Full Code Here

           
            //
            // read back test
            //
            ASN1InputStream aIn = new ASN1InputStream(new ByteArrayInputStream(v2CertList));
            DERObject       o = aIn.readObject();
           
            bOut = new ByteArrayOutputStream();
            aOut = new ASN1OutputStream(bOut);
           
            aOut.writeObject(o);
View Full Code Here

            ByteArrayInputStream    bIn = new ByteArrayInputStream(bOut.toByteArray());
            ASN1InputStream         aIn = new ASN1InputStream(bIn);
           
            for (int i = 0; i != values.length; i++)
            {
                DERObject   o = aIn.readObject();
                if (!values[i].equals(o))
                {
                    return new SimpleTestResult(false, getName() + ": Failed equality test for " + o);
                }
               
                if (o.hashCode() != values[i].hashCode())
                {
                    return new SimpleTestResult(false, getName() + ": Failed hashCode test for " + o);
                }
            }
           
View Full Code Here

            }
           
            ByteArrayInputStream    bIn = new ByteArrayInputStream(attrBytes);
            ASN1InputStream         aIn = new ASN1InputStream(bIn);
           
            DERObject   o = aIn.readObject();
            if (!attr.equals(o))
            {
                return new SimpleTestResult(false, getName() + ": Failed equality test for attr");
            }
           
View Full Code Here

            try
            {
                bIn = new ByteArrayInputStream(bytes);
                aIn = new ASN1InputStream(bIn);

                DERObject   obj = aIn.readObject();
   
                return new SimpleTestResult(false, getName() + ": test " + id + " length mismatch - expected " + sample.length + System.getProperty("line.separator") + ASN1Dump.dumpAsString(info) + " got " + bytes.length + System.getProperty("line.separator") + ASN1Dump.dumpAsString(obj));
            }
            catch (Exception e)
            {
View Full Code Here

      e.printStackTrace();
    }
   
    // javni kljuc se sastoji od modula i javnog eksponenta u odgovarajucoj ASN1 strukturi
    ASN1InputStream is = new ASN1InputStream(x509Cert.getPublicKey().getEncoded());
      DERObject obj = null;
    try {
      obj = is.readObject();
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.ssl.asn1.DERObject

Copyright © 2018 www.massapicom. 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.