Class OCSPServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.netscape.cms.servlet.base.CMSServlet
com.netscape.cms.servlet.ocsp.OCSPServlet
- All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Process OCSP messages, According to RFC 2560
See http://www.ietf.org/rfc/rfc2560.txt
- Version:
- $Revision$ $Date$
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.slf4j.Loggerstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class CMSServlet
ADMIN_GROUP, AUTH_FAILURE, AUTHMGR_PARAM, AUTHZ_MGR_BASIC, AUTHZ_MGR_LDAP, AUTHZ_SRC_LDAP, AUTHZ_SRC_TYPE, AUTHZ_SRC_XML, CA_AGENT_GROUP, CERT_ATTR, certAuthority, engine, ERROR_MSG_TOKEN, ERROR_TEMPLATE, EXCEPTION_TEMPLATE, FAILURE, FINAL_ERROR_MSG, FULL_ENROLLMENT_REQUEST, FULL_ENROLLMENT_RESPONSE, FULL_RESPONSE, KRA_AGENT_GROUP, mAclMethod, mAuthMgr, mAuthority, mAuthz, mAuthzResourceName, mConfig, mDontSaveHttpParams, mFinalErrorMsg, mGetClientCert, mId, mLogCategory, mOutputTemplatePath, mRenderResult, mRequestQueue, mSaveHttpHeaders, mServletConfig, mServletContext, mTemplates, OCSP_AGENT_GROUP, PENDING_TEMPLATE, PFX_AUTH_TOKEN, PFX_HTTP_HEADER, PFX_HTTP_PARAM, PROP_ACL, PROP_AUTHMGR, PROP_AUTHORITYID, PROP_AUTHZ_MGR, PROP_ERROR_TEMPLATE, PROP_EXCEPTION_TEMPLATE, PROP_FINAL_ERROR_MSG, PROP_PENDING_TEMPLATE, PROP_REJECTED_TEMPLATE, PROP_RESOURCEID, PROP_SUCCESS_TEMPLATE, PROP_SUCCESS_TEMPLATE_FILLER, PROP_SVC_PENDING_TEMPLATE, PROP_UNAUTHORIZED_TEMPLATE, RA_AGENT_GROUP, REJECTED_TEMPLATE, requestRepository, servletConfig, signedAuditLogger, SIMPLE_ENROLLMENT_REQUEST, SIMPLE_ENROLLMENT_RESPONSE, SUCCESS, SUCCESS_TEMPLATE, SVC_PENDING_TEMPLATE, TEMPLATE_NAME, TRUSTED_RA_GROUP, UNAUTHORIZED_TEMPLATEModifier and TypeFieldDescriptionprotected static final Stringstatic final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final Stringstatic final Stringprotected ICertificateAuthorityprotected CMSEnginestatic final Stringprotected static final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic Stringhandy routine to check if client want full enrollment responseprotected static final Stringprotected Stringprotected Stringprotected IAuthorityprotected AuthzSubsystemprotected Stringprotected IConfigStoreprotected Stringprotected Stringprotected Stringprotected LogSourceprotected Stringprotected booleanprotected ARequestQueueprotected javax.servlet.ServletConfigprotected javax.servlet.ServletContextprotected Hashtable<Integer, CMSLoadTemplate> protected static final Stringprotected static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final Stringprotected static final Stringstatic final Stringprotected static final Stringprotected static final Stringstatic final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected RequestRepositoryprotected javax.servlet.ServletConfigprotected static Loggerstatic final Stringstatic final Stringstatic final Stringprotected static final Stringprotected static final Stringstatic final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit(javax.servlet.ServletConfig sc) initialize the servlet.protected voidprocess(CMSRequest cmsReq) Process the HTTP request.Methods inherited from class CMSServlet
areCertsFromCA, audit, audit, auditGroupID, auditSubjectID, authenticate, authenticate, authenticate, authenticate, authorize, authorize, certIsRevoked, checkImportCertToNav, clientIsMSIE, clientIsNav, connectionIsSSL, doCMMFResponse, doFullResponse, formCRLEntry, generateSalt, getAuthCreds, getAuthMgr, getAuthToken, getCertRecord, getDontSaveHttpParams, getId, getLangFile, getLocale, getLocale, getRelPath, getSaveHttpHeaders, getSSLClientCertificate, getSSLClientCertificate, getTemplate, getX509Certificate, hashPassword, importCertToNav, invalidateSSLSession, isCertFromCA, isClientCertRequired, isSystemCertificate, newCMSRequest, newFillerObject, outputArgBlockAsXML, outputError, outputError, outputError, outputHttpParameters, outputResult, outputXML, renderException, renderFinalError, renderResult, renderTemplate, saveAuthToken, saveHttpHeaders, saveHttpParams, service, setDefaultTemplates, toHashtableModifier and TypeMethodDescriptionprotected booleanareCertsFromCA(X509Certificate[] certs) handy routine for checking if a list of certs is from this CA.protected voidprotected voidSigned Audit Log This method is inherited by all extended "CMSServlet"s, and is called to store messages to the signed audit log.protected StringSigned Audit Log Group ID This method is inherited by all extended "CMSServlet"s, and is called to obtain the "gid" for a signed audit log message.protected StringSigned Audit Log Subject ID This method is inherited by all extended "CMSServlet"s, and is called to obtain the "SubjectID" for a signed audit log message.authenticate(CMSRequest req) authenticate(CMSRequest req, String authMgrName) authenticate(javax.servlet.http.HttpServletRequest httpReq) authenticate(javax.servlet.http.HttpServletRequest httpReq, String authMgrName) Authenticationauthorize(String authzMgrName, IAuthToken authToken, String resource, String operation) Authorize must occur after Authenticateauthorize(String authzMgrName, String resource, IAuthToken authToken, String exp) protected booleancertIsRevoked(BigInteger serialNum) check if a certificate (serial number) is revoked on a CA.protected booleancheckImportCertToNav(javax.servlet.http.HttpServletResponse httpResp, IArgBlock httpParams, org.mozilla.jss.netscape.security.x509.X509CertImpl cert) static booleanclientIsMSIE(javax.servlet.http.HttpServletRequest httpReq) handy routine to check if client is msie based on user-agent.static booleanclientIsNav(javax.servlet.http.HttpServletRequest httpReq) handy routine to check if client is navigator based on user-agent.protected static booleanconnectionIsSSL(javax.servlet.http.HttpServletRequest httpReq) static booleandoCMMFResponse(IArgBlock httpParams) static booleandoFullResponse(IArgBlock httpParams) protected org.mozilla.jss.netscape.security.x509.RevokedCertImplformCRLEntry(BigInteger serialNo, org.mozilla.jss.netscape.security.x509.RevocationReason reason) make a CRL entry from a serial number and revocation reason.static Stringstatic AuthCredentialsgetAuthCreds(AuthManager authMgr, IArgBlock argBlock, X509Certificate clientCert) construct a authentication credentials to pass into authentication manager.protected IAuthTokengetAuthToken(IRequest req) protected CertRecordgetCertRecord(BigInteger serialNo) handy routine for getting a cert record given a serial number.protected voidgetDontSaveHttpParams(javax.servlet.ServletConfig sc) get http parameters not to save from configuration.getId()static FilegetLangFile(javax.servlet.http.HttpServletRequest req, File realpathFile, Locale[] locale) static Localeprotected LocalegetLocale(javax.servlet.http.HttpServletRequest req) Retrieves locale based on the request.protected StringgetRelPath(IAuthority authority) handy routine for getting agent's relative pathprotected voidgetSaveHttpHeaders(javax.servlet.ServletConfig sc) get http headers to save from configuration.protected X509CertificategetSSLClientCertificate(javax.servlet.http.HttpServletRequest httpReq) get ssl client authenticated certificateprotected X509CertificategetSSLClientCertificate(javax.servlet.http.HttpServletRequest httpReq, boolean clientCertRequired) protected CMSTemplategetTemplate(String templateName, javax.servlet.http.HttpServletRequest httpReq, Locale[] locale) get a template based on result status.protected X509CertificategetX509Certificate(BigInteger serialNo) handy routine for getting a certificate from the certificate repository.protected StringhashPassword(String pwd) voidimportCertToNav(javax.servlet.http.HttpServletResponse httpResp, org.mozilla.jss.netscape.security.x509.X509CertImpl cert, String contentType, boolean importCAChain) handy routine to import cert to old navigator in nav mime type.protected static voidinvalidateSSLSession(javax.servlet.http.HttpServletRequest httpReq) Invalidates a SSL Session.protected booleanisCertFromCA(X509Certificate cert) handy routine for validating if a cert is from this CA.booleanprotected booleanisSystemCertificate(BigInteger serialNo) A system certificate such as the CA signing certificate should not be allowed to delete.protected CMSRequestCreate a new CMSRequest object.protected ICMSTemplateFillernewFillerObject(String fillerClass) instantiate a new filler from a class name,protected voidoutputArgBlockAsXML(XMLObject xmlObj, Node parent, String argBlockName, IArgBlock argBlock) protected voidoutputError(javax.servlet.http.HttpServletResponse httpResp, String errorString) protected voidoutputError(javax.servlet.http.HttpServletResponse httpResp, String errorString, String requestId) protected voidoutputError(javax.servlet.http.HttpServletResponse httpResp, String status, String errorString, String requestId) voidoutputHttpParameters(javax.servlet.http.HttpServletRequest httpReq) protected voidoutputResult(javax.servlet.http.HttpServletResponse httpResp, String contentType, byte[] content) protected voidoutputXML(javax.servlet.http.HttpServletResponse httpResp, CMSTemplateParams params) protected voidrenderException(CMSRequest cmsReq, EBaseException e) Output exception (unexpected error) template This is different from other templates in that if an exception occurs while rendering the exception a message is printed out directly.voidrenderFinalError(CMSRequest cmsReq, Exception ex) protected voidrenderResult(CMSRequest cmsReq) Output a template.protected voidrenderTemplate(CMSRequest cmsReq, String templateName, ICMSTemplateFiller filler) protected static voidsaveAuthToken(IAuthToken token, IRequest req) protected voidsaveHttpHeaders(javax.servlet.http.HttpServletRequest httpReq, IRequest req) save http headers in a IRequest.protected voidsaveHttpParams(IArgBlock httpParams, IRequest req) save http headers in a IRequest.voidservice(javax.servlet.http.HttpServletRequest httpReq, javax.servlet.http.HttpServletResponse httpResp) protected voidsetDefaultTemplates(javax.servlet.ServletConfig sc) set default templates.toHashtable(javax.servlet.http.HttpServletRequest req) Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
logger
public static org.slf4j.Logger logger -
PROP_AUTHORITY
- See Also:
-
PROP_CLIENTAUTH
- See Also:
-
PROP_MAX_REQUEST_SIZE
- See Also:
-
PROP_ID
- See Also:
-
-
Constructor Details
-
OCSPServlet
public OCSPServlet()
-
-
Method Details
-
init
public void init(javax.servlet.ServletConfig sc) throws javax.servlet.ServletException initialize the servlet. This servlet uses the template file "ImportCert.template" to process the response.- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classCMSServlet- Parameters:
sc- servlet configuration, read from the web.xml file- Throws:
javax.servlet.ServletException
-
process
Process the HTTP request. This method is invoked when the OCSP service receives a OCSP request. Based on RFC 2560, the request should have the OCSP request in the HTTP body as binary blob.- Overrides:
processin classCMSServlet- Parameters:
cmsReq- the object holding the request and response information- Throws:
EBaseException- if the servlet was unable to satisfactorily process the request
-