Examples of IOCSPExtension


Examples of org.ejbca.core.protocol.ocsp.IOCSPExtension

    Iterator iter2 = m_extensionOids.iterator();
    m_extensionMap = new HashMap();
    while (iter.hasNext()) {
      String clazz = (String)iter.next();
      String oid = (String)iter2.next();
      IOCSPExtension ext = null;
      try {
        ext = (IOCSPExtension)Class.forName(clazz).newInstance();
        ext.init(config);
      } catch (Exception e) {
        m_log.error("Can not create extension with class "+clazz, e);
        continue;
      }
      m_extensionMap.put(oid,ext);
View Full Code Here

Examples of org.ejbca.core.protocol.ocsp.IOCSPExtension

              if (null != ext) {
                // We found an extension, call the extenstion class
                if (m_log.isDebugEnabled()) {
                  m_log.debug("Found OCSP extension oid: "+oidstr);
                }
                IOCSPExtension extObj = (IOCSPExtension)m_extensionMap.get(oidstr);
                if (extObj != null) {
                  // Find the certificate from the certId
                  X509Certificate cert = null;
                  cert = (X509Certificate)this.data.certificateStoreSession.findCertificateByIssuerAndSerno(this.data.m_adm, cacert.getSubjectDN().getName(), certId.getSerialNumber());
                  if (cert != null) {
                    // Call the OCSP extension
                    Hashtable retext = extObj.process(request, cert, certStatus);
                    if (retext != null) {
                      // Add the returned X509Extensions to the responseExtension we will add to the basic OCSP response
                      responseExtensions.putAll(retext);
                    } else {
                      String errMsg = intres.getLocalizedMessage("ocsp.errorprocessextension", extObj.getClass().getName()new Integer(extObj.getLastErrorCode()));
                      m_log.error(errMsg);
                    }
                  }
                }
              }
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.