Examples of DERIA5String


Examples of org.bouncycastle.asn1.DERIA5String

        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

Examples of org.bouncycastle.asn1.DERIA5String

          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

Examples of org.bouncycastle.asn1.DERIA5String

        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

Examples of org.bouncycastle.asn1.DERIA5String

    
      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

Examples of org.bouncycastle.asn1.DERIA5String

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

Examples of org.bouncycastle.asn1.DERIA5String

                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

Examples of org.bouncycastle.asn1.DERIA5String

      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

Examples of org.bouncycastle.asn1.DERIA5String

    }
  }

  protected void addV3CRLDistPoint(final JcaX509v3CertificateBuilder builder, final BouncyCastleCertificateRequest request) throws CertIOException {
    if (Conditions.isNotEmpty(request.getCrlDistPoint())) {
      GeneralName gn = new GeneralName(6, new DERIA5String(request.getCrlDistPoint()));

      ASN1EncodableVector vec = new ASN1EncodableVector();
      vec.add(gn);

      GeneralNames generalNames = GeneralNames.getInstance(new DERSequence(vec));
      DistributionPointName distributionPointName = new DistributionPointName(0, generalNames);
      CRLDistPoint crlDistPoint = new CRLDistPoint(new DistributionPoint[] { new DistributionPoint(distributionPointName, null, null) });

      builder.addExtension(X509Extension.cRLDistributionPoints, false, crlDistPoint);
      builder.addExtension(MiscObjectIdentifiers.netscapeCApolicyURL, false, new DERIA5String(request.getCrlDistPoint()));
    }
  }
View Full Code Here

Examples of org.bouncycastle.asn1.DERIA5String

    }
  }

  protected void addV3OcspUrl(final JcaX509v3CertificateBuilder builder, final BouncyCastleCertificateRequest request) throws CertIOException {
    if (Conditions.isNotEmpty(request.getOcspURL())) {
      GeneralName ocspLocation = new GeneralName(6, new DERIA5String(request.getOcspURL()));
      builder.addExtension(X509Extension.authorityInfoAccess, false, new AuthorityInformationAccess(X509ObjectIdentifiers.ocspAccessMethod, ocspLocation));
    }
  }
View Full Code Here

Examples of org.bouncycastle.asn1.DERIA5String

    }
  }

  protected void addV3PolicyUrl(final JcaX509v3CertificateBuilder builder, final BouncyCastleCertificateRequest request) throws CertIOException {
    if (Conditions.isNotEmpty(request.getPolicyURL())) {
      builder.addExtension(MiscObjectIdentifiers.netscapeCApolicyURL, false, new DERIA5String(request.getPolicyURL()));
    }
  }
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.