Examples of CRLDistPoint


Examples of org.bouncycastle.asn1.x509.CRLDistPoint

      obj = null;
    }
      if (obj == null) {
          return null;
      }
      CRLDistPoint dist = CRLDistPoint.getInstance(obj);
      DistributionPoint[] dists = dist.getDistributionPoints();
      for (DistributionPoint p : dists) {
          DistributionPointName distributionPointName = p.getDistributionPoint();
          if (DistributionPointName.FULL_NAME != distributionPointName.getType()) {
              continue;
          }
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

        assertNotNull("CRL has no Freshest Distribution Point", cFreshestDpDER);

        ASN1InputStream aIn = new ASN1InputStream(new ByteArrayInputStream(cFreshestDpDER));
        ASN1OctetString octs = (ASN1OctetString) aIn.readObject();
        aIn = new ASN1InputStream(new ByteArrayInputStream(octs.getOctets()));
        CRLDistPoint cdp = new CRLDistPoint((ASN1Sequence) aIn.readObject());
        DistributionPoint[] distpoints = cdp.getDistributionPoints();

        assertEquals("More CRL Freshest distributions points than expected", 1, distpoints.length);
        assertEquals("Freshest CRL distribution point is different", freshestCdpURL, ((DERIA5String) ((GeneralNames) distpoints[0].getDistributionPoint()
                .getName()).getNames()[0].getName()).getString());
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

            if (!isDeltaCRL) {
                String crlFreshestDP = getCADefinedFreshestCRL();
                List<DistributionPoint> freshestDistPoints = generateDistributionPoints(crlFreshestDP);
                if (freshestDistPoints.size() > 0) {
                    CRLDistPoint ext = new CRLDistPoint((DistributionPoint[])freshestDistPoints.toArray(new DistributionPoint[freshestDistPoints.size()]));

                    // According to the RFC, the Freshest CRL extension on a
                    // CRL must not be marked as critical. Therefore it is
                    // hardcoded as not critical and is independent of
                    // getCrlDistributionPointOnCrlCritical().
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

        if ( (dpn != null) || (issuer != null) ) {
          distpoints.add(new DistributionPoint(dpn, null, issuer));                               
        }
      }
    }
    CRLDistPoint ret = null;
    if (!distpoints.isEmpty()) {
      ret = new CRLDistPoint((DistributionPoint[])distpoints.toArray(new DistributionPoint[distpoints.size()]));     
    }
    if (ret == null) {
      log.error("DrlDistributionPoints missconfigured, no distribution points available.");
    }
    return ret;
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

        final X509CA x509ca = (X509CA)ca;
        if(certProfile.getUseCADefinedFreshestCRL()){
            freshestcrldistpoint = x509ca.getCADefinedFreshestCRL();
        }
        // Multiple FCDPs are separated with the ';' sign
        CRLDistPoint ret = null;
        if (freshestcrldistpoint != null) {
          final StringTokenizer tokenizer = new StringTokenizer(freshestcrldistpoint, ";", false);
          final ArrayList<DistributionPoint> distpoints = new ArrayList<DistributionPoint>();
            while (tokenizer.hasMoreTokens()) {
              final String uri = tokenizer.nextToken();
                final GeneralName gn = new GeneralName(GeneralName.uniformResourceIdentifier, new DERIA5String(uri));
                if (log.isDebugEnabled()) {
                  log.debug("Added freshest CRL distpoint: "+uri);
                }
                final ASN1EncodableVector vec = new ASN1EncodableVector();
                vec.add(gn);
                final GeneralNames gns = new GeneralNames(new DERSequence(vec));
                final DistributionPointName dpn = new DistributionPointName(0, gns);
                distpoints.add(new DistributionPoint(dpn, null, null));
            }
            if (!distpoints.isEmpty()) {
                ret = new CRLDistPoint((DistributionPoint[])distpoints.toArray(new DistributionPoint[distpoints.size()]));
            }              
        }
    if (ret == null) {
            log.error("UseFreshestCRL is true, but no URI string defined!");
    }
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

        DEROctetString dosCrlDP = (DEROctetString) derObjCrlDP;
        byte[] crldpExtOctets = dosCrlDP.getOctets();
        ASN1InputStream oAsnInStream2 = new ASN1InputStream(
                new ByteArrayInputStream(crldpExtOctets));
        DERObject derObj2 = oAsnInStream2.readObject();
        CRLDistPoint distPoint = CRLDistPoint.getInstance(derObj2);
        List<String> crlUrls = new ArrayList<String>();
        for (DistributionPoint dp : distPoint.getDistributionPoints()) {
            DistributionPointName dpn = dp.getDistributionPoint();
            // Look for URIs in fullName
            if (dpn != null
                && dpn.getType() == DistributionPointName.FULL_NAME) {
                GeneralName[] genNames = GeneralNames.getInstance(
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

  private Set<String> getCrlUrls(final X509Certificate aCert) {
    final Set<String> tmpResult = new HashSet<String>();
    options.log("console.crlinfo.retrieveCrlUrl", aCert.getSubjectX500Principal().getName());
    final byte[] crlDPExtension = aCert.getExtensionValue(X509Extensions.CRLDistributionPoints.getId());
    if (crlDPExtension != null) {
      CRLDistPoint crlDistPoints = null;
      try {
        crlDistPoints = CRLDistPoint.getInstance(X509ExtensionUtil.fromExtensionValue(crlDPExtension));
      } catch (IOException e) {
        e.printStackTrace(options.getPrintWriter());
      }
      if (crlDistPoints != null) {
        final DistributionPoint[] distPoints = crlDistPoints.getDistributionPoints();
        distPoint: for (DistributionPoint dp : distPoints) {
          final DistributionPointName dpName = dp.getDistributionPoint();
          final GeneralNames generalNames = (GeneralNames) dpName.getName();
          if (generalNames != null) {
            final GeneralName[] generalNameArr = generalNames.getNames();
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

                                GeneralName    n = GeneralName.getInstance(sq.getObjectAt(i));
                            }
                        }
                        else if (oid.equals(X509Extensions.CRLDistributionPoints))
                        {
                            CRLDistPoint    p = CRLDistPoint.getInstance(extIn.readObject());
                           
                            DistributionPoint[] points = p.getDistributionPoints();
                            for (int i = 0; i != points.length; i++)
                            {
                                ;
                            }
                        }
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

      obj = null;
    }
      if (obj == null) {
          return null;
      }
      CRLDistPoint dist = CRLDistPoint.getInstance(obj);
      DistributionPoint[] dists = dist.getDistributionPoints();
      for (DistributionPoint p : dists) {
          DistributionPointName distributionPointName = p.getDistributionPoint();
          if (DistributionPointName.FULL_NAME != distributionPointName.getType()) {
              continue;
          }
View Full Code Here

Examples of org.bouncycastle.asn1.x509.CRLDistPoint

        throws AnnotatedException
    {
        Set set = new HashSet();
        if (paramsPKIX.isUseDeltasEnabled())
        {
            CRLDistPoint freshestCRL = null;
            try
            {
                freshestCRL = CRLDistPoint
                    .getInstance(CertPathValidatorUtilities.getExtensionValue(cert, FRESHEST_CRL));
            }
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.