Package org.apache.commons.ssl.asn1

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


        String[] strs)
    {
        ASN1EncodableVector v = new ASN1EncodableVector();
        for (int i = 0; i < strs.length; i++)
        {
            v.add(new DERUTF8String(strs[i]));
        }
        strings = new DERSequence(v);
    }
View Full Code Here


            {
                 return new DERPrintableString(value);
            }
        }
       
        return new DERUTF8String(value);
    }
View Full Code Here

            switch (o.getTagNo())
            {
            case 0:
                DirectoryString countryNameDirectoryString = DirectoryString.getInstance(o, true);
                this.countryName = new DERUTF8String(countryNameDirectoryString.getString());
                break;
            case 1:
                DirectoryString localityNameDirectoryString = DirectoryString.getInstance(o, true);
                this.localityName = new DERUTF8String(localityNameDirectoryString.getString());
                break;
            case 2:
                if (o.isExplicit())
                {
                    this.postalAddress = ASN1Sequence.getInstance(o, true);
View Full Code Here

        this.string = string;
    }

    public DirectoryString(String string)
    {
        this.string = new DERUTF8String(string);
    }
View Full Code Here

            {
                 return new DERPrintableString(value);
            }
        }
       
        return new DERUTF8String(value);
    }
View Full Code Here

      {
         case CONTENT_TYPE_IA5STRING:
            contents = (DERString)new DERIA5String (text);
            break;
         case CONTENT_TYPE_UTF8STRING:
            contents = (DERString)new DERUTF8String(text);
            break;
         case CONTENT_TYPE_VISIBLESTRING:
            contents = (DERString)new DERVisibleString(text);
            break;
         case CONTENT_TYPE_BMPSTRING:
            contents = (DERString)new DERBMPString(text);
            break;
         default:
            contents = (DERString)new DERUTF8String(text);
            break;
      }
   }
View Full Code Here

      {
         text = text.substring(0, DISPLAY_TEXT_MAXIMUM_SIZE);
      }
     
      contentType = CONTENT_TYPE_UTF8STRING;
      contents = new DERUTF8String(text);
   }
View Full Code Here

        {
            return new DERPrintableString(value);
        }
        else if (canBeUTF8(value))
        {
            return new DERUTF8String(value);
        }

        return new DERBMPString(value);
    }
View Full Code Here

        //    values  SET SIZE(1..MAX) OF ATTRIBUTE.&Type({IOSet}{\@type})
        // }
        ASN1EncodableVector vec = new ASN1EncodableVector();
        vec.add(PKCSObjectIdentifiers.pkcs_9_at_challengePassword);
        ASN1EncodableVector values = new ASN1EncodableVector();
        values.add(new DERUTF8String(password));
        vec.add(new DERSet(values));
        ASN1EncodableVector v = new ASN1EncodableVector();
        v.add(new DERSequence(vec));
        DERSet set = new DERSet(v);
        // Create PKCS#10 certificate request
View Full Code Here

        if ( seq != null) {                   
            // First in sequence is the object identifier, that we must check
            DERObjectIdentifier id = DERObjectIdentifier.getInstance(seq.getObjectAt(0));
            if (id.getId().equals(CertTools.UPN_OBJECTID)) {
                ASN1TaggedObject obj = (ASN1TaggedObject) seq.getObjectAt(1);
                DERUTF8String str = DERUTF8String.getInstance(obj.getObject());
                return str.getString();                       
            }
        }
        return null;
    }
View Full Code Here

TOP

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

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.