Package org.apache.geronimo.crypto.asn1

Examples of org.apache.geronimo.crypto.asn1.DERIA5String


                new DERBoolean(true),
                new DERBoolean(false),
                new DEREnumerated(100),
                new DERGeneralizedTime(new Date()),
                new DERGeneralString("hello world"),
                new DERIA5String("hello"),
                new DERInteger(1000),
                new DERNull(),
                new DERNumericString("123456"),
                new DERObjectIdentifier("1.1.1.10000.1"),
                new DEROctetString(data),
View Full Code Here


    * <code>String</code>.
    */
   public PolicyQualifierInfo (String cps)
   {
      policyQualifierId = PolicyQualifierId.id_qt_cps;
      qualifier = new DERIA5String (cps);
   }
View Full Code Here

      }
    
      contentType = type;
      switch (type) {
         case CONTENT_TYPE_IA5STRING:
            contents = (DERString)new DERIA5String (text);
            break;
         case CONTENT_TYPE_UTF8STRING:
            contents = (DERString)new DERUTF8String(text);
            break;
         case CONTENT_TYPE_VISIBLESTRING:
View Full Code Here

        byte[]  testIv = { 1, 2, 3, 4, 5, 6, 7, 8 };
       
        ASN1Encodable[]     values = {
            new CAST5CBCParameters(testIv, 128),
            new NetscapeCertType(NetscapeCertType.smime),   
            new VerisignCzagExtension(new DERIA5String("hello")),
            new IDEACBCPar(testIv),       
            new NetscapeRevocationURL(new DERIA5String("http://test"))
        };
       
        byte[] data = Base64.decode("MA4ECAECAwQFBgcIAgIAgAMCBSAWBWhlbGxvMAoECAECAwQFBgcIFgtodHRwOi8vdGVzdA==");
       
        try
View Full Code Here

          GeneralName[] names = generalNames.getNames();
          for (GeneralName name : names) {
              if (name.getTagNo() != GeneralName.uniformResourceIdentifier) {
                  continue;
              }
              DERIA5String derStr = DERIA5String.getInstance((ASN1TaggedObject)name.toASN1Primitive(), false);
              return derStr.getString();
          }
      }
      return null;
  }
View Full Code Here

        String    name)
    {
        if (tag == rfc822Name || tag == dNSName || tag == uniformResourceIdentifier)
        {
            this.tag = tag;
            this.obj = new DERIA5String(name);
        }
        else if (tag == registeredID)
        {
            this.tag = tag;
            this.obj = new DERObjectIdentifier(name);
View Full Code Here

    
      contentType = type;
      switch (type)
      {
         case CONTENT_TYPE_IA5STRING:
            contents = (DERString)new DERIA5String (text);
            break;
         case CONTENT_TYPE_UTF8STRING:
            contents = (DERString)new DERUTF8String(text);
            break;
         case CONTENT_TYPE_VISIBLESTRING:
View Full Code Here

    */
   public PolicyQualifierInfo(
       String cps)
   {
      policyQualifierId = PolicyQualifierId.id_qt_cps;
      qualifier = new DERIA5String (cps);
   }
View Full Code Here

                throw new RuntimeException("can't recode value for oid " + oid.getId());
            }
        }
        else if (oid.equals(X509Name.EmailAddress))
        {
            return new DERIA5String(value);
        }
        else if (canBePrintable(value)) 
        {
            return new DERPrintableString(value);
        }
View Full Code Here

      vector = new ASN1EncodableVector();
      for (Entry<String, String> entry : request.getCertificatePolicies().entrySet()) {
        String oid = entry.getKey();
        String value = entry.getValue();
        ASN1ObjectIdentifier policyIdentifier = new ASN1ObjectIdentifier(oid);
        PolicyQualifierInfo policyQualifierInfo = new PolicyQualifierInfo(policyIdentifier, new DERIA5String(value));
        DERSequence policyQualifiers = new DERSequence(new ASN1Encodable[] { policyQualifierInfo });
        PolicyInformation policyInformation = new PolicyInformation(policyIdentifier, policyQualifiers);
        vector.add(policyInformation);
      }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.crypto.asn1.DERIA5String

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.