Package org.apache.geronimo.util.asn1

Examples of org.apache.geronimo.util.asn1.DERUTF8String


    //   -- This certificate, according to Act. No. xxxx Electronic Signature Law is a qualified electronic certificate
    //
    // YourCustomUTF8String ::= UTF8String
    if (certProfile.getUseQCCustomString() &&
        !StringUtils.isEmpty(certProfile.getQCCustomStringOid()) && !StringUtils.isEmpty(certProfile.getQCCustomStringText())) {
      final DERUTF8String str = new DERUTF8String(certProfile.getQCCustomStringText());
      final DERObjectIdentifier oid = new DERObjectIdentifier(certProfile.getQCCustomStringOid());
      qc = new QCStatement(oid, str);
      qcs.add(qc);                
    }
    if (!qcs.isEmpty()) {
View Full Code Here


                new DERT61String("hello world"),
                new DERTaggedObject(0, new DERPrintableString("hello world")),
                new DERUniversalString(data),
                new DERUnknownTag(0xff & (~(DERTags.TAGGED | DERTags.APPLICATION)), data),
                new DERUTCTime(new Date()),
                new DERUTF8String("hello world"),
                new DERVisibleString("hello world")
            };
       
        try
        {
View Full Code Here

      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:
            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

      }
     
      if (canBeUTF8(text))
      {
          contentType = CONTENT_TYPE_UTF8STRING;
          contents = new DERUTF8String(text);
      }
      else
      {
          contentType = CONTENT_TYPE_BMPSTRING;
          contents = new DERBMPString(text);
View Full Code Here

                            Log.debug("CertificateManager: Ignoring non-XMPP otherName, " + objectId.getId());
                            continue;
                        }

                        // Get identity string
                        DERUTF8String derStr = DERUTF8String.getInstance(otherNameSeq.getObjectAt(1));
                        String identity = derStr.getString();
                        if (identity != null && identity.length() > 0) {
                            // Add the decoded server name to the list of identities
                            identities.add(identity);
                        }
                    }
View Full Code Here

        certGenerator.setSignatureAlgorithm(signAlgoritm);

        // Generate the subject alternative name
        boolean critical = subjectDN == null || "".equals(subjectDN.trim());
        DERSequence othernameSequence = new DERSequence(new ASN1Encodable[]{
                new DERObjectIdentifier("1.3.6.1.5.5.7.8.5"), new DERTaggedObject(true, 0, new DERUTF8String(domain))});
        GeneralName othernameGN = new GeneralName(GeneralName.otherName, othernameSequence);
        GeneralNames subjectAltNames = new GeneralNames(new DERSequence(new ASN1Encodable[]{othernameGN}));
        // Add subject alternative name extension
        certGenerator.addExtension(X509Extensions.SubjectAlternativeName, critical, subjectAltNames);
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

      }
     
      if (canBeUTF8(text))
      {
          contentType = CONTENT_TYPE_UTF8STRING;
          contents = new DERUTF8String(text);
      }
      else
      {
          contentType = CONTENT_TYPE_BMPSTRING;
          contents = new DERBMPString(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

                        a2.add(new DERObjectIdentifier(reject));
                    }
                    a1.add(new DERTaggedObject(0,new DERSequence(a2)));
                }
                if(aux.alias != null) {
                    a1.add(new DERUTF8String(aux.alias));
                }
                if(aux.keyid != null) {
                    a1.add(new DEROctetString(aux.keyid));
                }
                if(aux.other.size()>0) {
View Full Code Here

TOP

Related Classes of org.apache.geronimo.util.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.