Package org.ejbca.core.protocol.certificatestore

Examples of org.ejbca.core.protocol.certificatestore.HashID


      if (log.isDebugEnabled()) {
        log.debug("No caCert, returning null.");
      }
      return null;
    }
    final HashID id = HashID.getFromSubjectDN(caCert);
    final String issuerDN = CertTools.getSubjectDN(caCert);
    this.rebuildlock.lock();
    try {
      final CRLInfo crlInfo = this.crlSession.getLastCRLInfo(this.admin, issuerDN, isDelta);
      if ( crlInfo==null ) {
View Full Code Here


    }
    return null; // everything OK
  }
  private static String testCRLStore( RFC4387URL urlType, boolean isDelta, CA ca, CrlSessionRemote createCrlSession, String port) throws Exception {
    final X509Certificate caCert = (X509Certificate)ca.getCACertificate();
    final HashID id;
    switch( urlType ) {
    case sKIDHash:
      id = HashID.getFromKeyID(caCert);
      break;
    case iHash:
View Full Code Here

    Assert.assertTrue( "Fetching CRL with '"+sURI+"' is not working.", HttpURLConnection.HTTP_OK==connection.getResponseCode() );
    return (X509Certificate)this.cf.generateCertificate(connection.getInputStream());
  }
  private void checkIssuer( X509Certificate bottom ) throws IOException, CertificateException, URISyntaxException {
    final String bottomName = bottom.getSubjectX500Principal().getName();
    final HashID keyID = HashID.getFromAuthorityKeyId(bottom);
    if ( keyID==null ) {
      log.info("No authority key ID in certificate: "+bottomName);
      return; // can not be checked
    }
    final X509Certificate upper = getCert(RFC4387URL.sKIDHash, keyID);
View Full Code Here

    log.debug("reloadcache returned code: "+connection.getResponseCode());
   
    // Now on to the actual tests, with fresh caches
    log.info("Testing certificate: "+theCert.getSubjectX500Principal().getName());

    final HashID subjectID = HashID.getFromSubjectDN(theCert);
    Assert.assertEquals("Certificate fetched by subject DN was wrong.", theCert, getCert(RFC4387URL.sHash, subjectID));

    final HashID keyID = HashID.getFromKeyID(theCert);
    Assert.assertEquals("Certificate fetched by public key ID was wrong.", theCert, getCert(RFC4387URL.sKIDHash, keyID));

    final String sURI = RFC4387URL.iHash.appendQueryToURL(getURL(), subjectID);
    // remove keyID from list of CA keyIds to be checked.
    Assert.assertTrue("The certificate '"+theCert.getSubjectX500Principal().getName()+"' already tested.", setOfSubjectKeyIDs.remove(keyID.key));
View Full Code Here

TOP

Related Classes of org.ejbca.core.protocol.certificatestore.HashID

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.