Package org.bouncycastle.asn1

Examples of org.bouncycastle.asn1.ASN1InputStream.available()


              DERObjectIdentifier oid = (DERObjectIdentifier) seq2.getObjectAt(0);
              if ("2.5.29.17".equals(oid.getId())) {  //SubjectAN
                try {
                  DEROctetString dos = (DEROctetString) seq2.getObjectAt(2);
                  ASN1InputStream ais = new ASN1InputStream(new ByteArrayInputStream(dos.getOctets()));
                  while (ais.available()>0) {
                      DERSequence seq3 = (DERSequence) ais.readObject();
                      Enumeration enum1 = seq3.getObjects();
                      while (enum1.hasMoreElements()) {
                        DERTaggedObject dto = (DERTaggedObject) enum1.nextElement();
                        if (dto.getTagNo() == 0) {
View Full Code Here


    if(value.matches("^\\p{XDigit}*")){     
      byte[] bytes = Hex.decode(value);
      try {
        ASN1InputStream ais = new ASN1InputStream(bytes);
        DEREncodable firstObject = ais.readObject();
        if (ais.available() > 0) {
          ASN1EncodableVector ev = new ASN1EncodableVector();
          ev.add(firstObject);
          while (ais.available() > 0) {
            ev.add(ais.readObject());
          }
View Full Code Here

        ASN1InputStream ais = new ASN1InputStream(bytes);
        DEREncodable firstObject = ais.readObject();
        if (ais.available() > 0) {
          ASN1EncodableVector ev = new ASN1EncodableVector();
          ev.add(firstObject);
          while (ais.available() > 0) {
            ev.add(ais.readObject());
          }
          retval = new DERSequence(ev);
        } else {
          retval = firstObject;
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.