com.netscape.certsrv.apps
Interface ICMSEngine

All Superinterfaces:
ISubsystem

public interface ICMSEngine
extends ISubsystem

This interface represents the CMS core framework. The framework contains a set of services that provide the foundation of a security application.

The engine implementation is loaded by CMS at startup. It is responsible for starting up all the related subsystems.

Version:
$Revision: 1470 $, $Date: 2010-11-03 17:57:08 -0700 (Wed, 03 Nov 2010) $

Method Summary
 boolean areRequestsDisabled()
          Checks to ensure that all new incoming requests have been blocked.
 byte[] AtoB(java.lang.String data)
          Converts a MIME-64 encoded string into a BER-encoded byte array.
 java.lang.String BtoA(byte[] data)
          Converts a BER-encoded byte array into a MIME-64 encoded string.
 netscape.security.util.ObjectIdentifier checkOID(java.lang.String attrName, java.lang.String value)
          Checks if the given OID is valid.
 IArgBlock createArgBlock()
          Creates argument block.
 IArgBlock createArgBlock(java.util.Hashtable httpReq)
          Creates argument block.
 IArgBlock createArgBlock(java.lang.String realm, java.util.Hashtable httpReq)
          Creates argument block.
 ICRLIssuingPointRecord createCRLIssuingPointRecord(java.lang.String id, java.math.BigInteger crlNumber, java.lang.Long crlSize, java.util.Date thisUpdate, java.util.Date nextUpdate)
          Creates an issuing poing record.
 IConfigStore createFileConfigStore(java.lang.String path)
          Create configuration file.
 IGeneralNameAsConstraintsConfig createGeneralNameAsConstraintsConfig(java.lang.String name, IConfigStore config, boolean isValueConfigured, boolean isPolicyEnabled)
          Created general name constraints configuration.
 IGeneralNamesAsConstraintsConfig createGeneralNamesAsConstraintsConfig(java.lang.String name, IConfigStore config, boolean isValueConfigured, boolean isPolicyEnabled)
          Created general name constraints configuration.
 IGeneralNamesConfig createGeneralNamesConfig(java.lang.String name, IConfigStore config, boolean isValueConfigured, boolean isPolicyEnabled)
          Created general names configuration.
 IRepositoryRecord createRepositoryRecord()
          Creates a repository record in the internal database.
 ISubjAltNameConfig createSubjAltNameConfig(java.lang.String name, IConfigStore config, boolean isValueConfigured)
          Creates subject alt name configuration.
 void debug(byte[] data)
          Puts data of an byte array into the debug file.
 void debug(int level, java.lang.String msg)
          Puts a message into the debug file.
 void debug(java.lang.String msg)
          Puts a message into the debug file.
 void debug(java.lang.Throwable e)
          Puts an exception into the debug file.
 boolean debugOn()
          Checks if the debug mode is on or not.
 void debugStackTrace()
          Puts the current stack trace in the debug file.
 void disableRequests()
          Blocks all new incoming requests.
 void forceShutdown()
          Performs graceful shutdown of CMS.
 netscape.security.x509.GeneralName form_GeneralName(java.lang.String generalNameChoice, java.lang.String value)
          Creates a general name.
 netscape.security.x509.GeneralName form_GeneralNameAsConstraints(java.lang.String generalNameChoice, java.lang.String value)
          Creates a general name constraints.
 java.lang.String getAdminHost()
          Retrieves the host name of the server's administration service.
 java.lang.String getAdminIP()
          Retrieves the IP address of the server's administration service.
 java.lang.String getAdminPort()
          Retrieves the port number of the server's administration service.
 java.lang.String getAgentHost()
          Retrieves the host name of the server's agent service.
 java.lang.String getAgentIP()
          Retrieves the IP address of the server's agent service.
 java.lang.String getAgentPort()
          Retrieves the port number of the server's agent service.
 netscape.ldap.LDAPConnection getBoundConnection(java.lang.String host, int port, int version, netscape.ldap.LDAPSSLSocketFactoryExt fac, java.lang.String bindDN, java.lang.String bindPW)
           
 org.mozilla.jss.CryptoManager.CertificateUsage getCertificateUsage(java.lang.String certusage)
          get the CertificateUsage as defined in JSS CryptoManager
 ICertPrettyPrint getCertPrettyPrint(java.security.cert.X509Certificate cert)
          Retrieves the certificate pretty print handler.
 ICommandQueue getCommandQueue()
          Retrieves command queue
 java.lang.String getConfigSDSessionId()
           
 ICRLPrettyPrint getCRLCachePrettyPrint(ICRLIssuingPoint ip)
          Retrieves the CRL cache pretty print handler.
 java.lang.String getCRLIssuingPointRecordName()
          Retrieves the default CRL issuing point record name.
 ICRLPrettyPrint getCRLPrettyPrint(java.security.cert.X509CRL crl)
          Retrieves the CRL pretty print handler.
 int getCSState()
           
 java.util.Date getCurrentDate()
          Returns a server wide system time.
 netscape.security.x509.X509CertInfo getDefaultX509CertInfo()
          Retrieves the default X.509 certificate template.
 java.lang.String getEEClientAuthSSLPort()
          Retrieves the port number of the server's client auth secure end entity service.
 java.lang.String getEEHost()
          Retrieves the host name of the server's secure end entity service.
 java.lang.String getEENonSSLHost()
          Retrieves the host name of the server's non-secure end entity service.
 java.lang.String getEENonSSLIP()
          Retrieves the IP address of the server's non-secure end entity service.
 java.lang.String getEENonSSLPort()
          Retrieves the port number of the server's non-secure end entity service.
 java.lang.String getEESSLHost()
          Retrieves the host name of the server's secure end entity service.
 java.lang.String getEESSLIP()
          Retrieves the IP address of the server's secure end entity service.
 java.lang.String getEESSLPort()
          Retrieves the port number of the server's secure end entity service.
 IEmailFormProcessor getEmailFormProcessor()
          Retrieves the email form processor.
 IEmailResolverKeys getEmailResolverKeys()
          Retrieves the email key resolver.
 IEmailTemplate getEmailTemplate(java.lang.String path)
          Retrieves the email form template.
 java.lang.String getEncodedCert(java.security.cert.X509Certificate cert)
          Retrieves the certifcate in MIME-64 encoded format with header and footer.
 IExtPrettyPrint getExtPrettyPrint(netscape.security.x509.Extension e, int indent)
          Retrieves the extension pretty print handler.
 java.lang.String getFingerPrint(java.security.cert.Certificate cert)
          Returns the finger print of the given certificate.
 java.lang.String getFingerPrints(byte[] certDer)
           
 java.lang.String getFingerPrints(java.security.cert.Certificate cert)
          Returns the finger print of the given certificate.
 void getGeneralNameConfigDefaultParams(java.lang.String name, boolean isValueConfigured, java.util.Vector params)
          Retrieves default general name configuration.
 void getGeneralNameConfigExtendedPluginInfo(java.lang.String name, boolean isValueConfigured, java.util.Vector info)
          Retrieves extended plugin info for general name configuration.
 void getGeneralNamesConfigDefaultParams(java.lang.String name, boolean isValueConfigured, java.util.Vector params)
          Retrieves default general names configuration.
 void getGeneralNamesConfigExtendedPluginInfo(java.lang.String name, boolean isValueConfigured, java.util.Vector info)
          Retrieves extended plugin info for general name configuration.
 IHttpConnection getHttpConnection(IRemoteAuthority authority, com.netscape.cmsutil.net.ISocketFactory factory)
          Retrieves the HTTP Connection for use with connector.
 IHttpConnection getHttpConnection(IRemoteAuthority authority, com.netscape.cmsutil.net.ISocketFactory factory, int timeout)
          Retrieves the HTTP Connection for use with connector.
 IPKIMessage getHttpPKIMessage()
          Creates a HTTP PKI Message that can be sent to a remote authority.
 IRequestEncoder getHttpRequestEncoder()
          Creates a request encoder.
 java.lang.String getId()
          Gets this ID .
 java.lang.String getInstanceDir()
          Retrieves the instance roort path of this server.
 ILdapConnFactory getLdapAnonConnFactory()
          Retrieves the LDAP connection factory.
 ILdapAuthInfo getLdapAuthInfo()
          Creates a LDAP Auth Info object.
 ILdapConnFactory getLdapBoundConnFactory()
          Retrieves the LDAP connection factory.
 ILdapConnInfo getLdapConnInfo(IConfigStore config)
          Retrieves the ldap connection information from the configuration store.
 netscape.ldap.LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory()
          Creates a LDAP SSL socket.
 netscape.ldap.LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory(java.lang.String certNickname)
          Creates a LDAP SSL socket with the given nickname.
 ILogger getLogger()
          Returns the logger of the current server.
 java.lang.String getLogMessage(java.lang.String msgID)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String[] p)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1, java.lang.String p2)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6, java.lang.String p7)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6, java.lang.String p7, java.lang.String p8)
          Retrieves the centralized log message from LogMessages.properties.
 java.lang.String getLogMessage(java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3, java.lang.String p4, java.lang.String p5, java.lang.String p6, java.lang.String p7, java.lang.String p8, java.lang.String p9)
          Retrieves the centralized log message from LogMessages.properties.
 IMailNotification getMailNotification()
          Retrieves the email notification handler.
 org.mozilla.jss.util.PasswordCallback getPasswordCallback()
          Retrieves the password callback.
 IPasswordCheck getPasswordChecker()
          Retrieves the password check.
 com.netscape.cmsutil.password.IPasswordStore getPasswordStore()
           
 int getpid()
          Retrieves the process id of this server.
 byte[] getPKCS7(java.util.Locale locale, IRequest req)
           
 IPrettyPrintFormat getPrettyPrintFormat(java.lang.String delimiter)
          Retrieves the certificate pretty print handler.
 IEmailResolver getReqCertSANameEmailResolver()
          Retrieves the email resolver that checks for subjectAlternateName.
 IResender getResender(IAuthority authority, java.lang.String nickname, IRemoteAuthority remote, int interval)
          Retrieves the request sender for use with connector.
 ISecurityDomainSessionTable getSecurityDomainSessionTable()
           
 java.lang.String getServerCertNickname()
          Retrieves the nickname of the server's server certificate.
 ILogger getSignedAuditLogger()
          Returns the signed audit logger of the current server.
 long getStartupTime()
          Retrieves time server started up.
 void getSubjAltNameConfigDefaultParams(java.lang.String name, java.util.Vector params)
          Get default parameters for subject alt name configuration.
 void getSubjAltNameConfigExtendedPluginInfo(java.lang.String name, java.util.Vector params)
          Get extended plugin info for subject alt name configuration.
 ISubsystem getSubsystem(java.lang.String name)
          Retrieves the registered subsytem with the given name.
 java.util.Enumeration getSubsystemNames()
          Returns the names of all the registered subsystems.
 java.util.Enumeration getSubsystems()
          Returns all the registered subsystems.
 java.lang.String getUserMessage(java.util.Locale locale, java.lang.String msgID)
          Retrieves the localized user message from UserMessages.properties.
 java.lang.String getUserMessage(java.util.Locale locale, java.lang.String msgID, java.lang.String p1)
          Retrieves the localized user message from UserMessages.properties.
 java.lang.String getUserMessage(java.util.Locale locale, java.lang.String msgID, java.lang.String[] p)
          Retrieves the localized user message from UserMessages.properties.
 java.lang.String getUserMessage(java.util.Locale locale, java.lang.String msgID, java.lang.String p1, java.lang.String p2)
          Retrieves the localized user message from UserMessages.properties.
 java.lang.String getUserMessage(java.util.Locale locale, java.lang.String msgID, java.lang.String p1, java.lang.String p2, java.lang.String p3)
          Retrieves the localized user message from UserMessages.properties.
 boolean isEncryptionCert(java.security.cert.X509Certificate cert)
          Checks if the given certificate is an encryption certificate.
 boolean isInRunningState()
          Is the server in running state.
 boolean isPreOpMode()
           
 boolean isRevoked(java.security.cert.X509Certificate[] certificates)
          Checks against the local certificate repository to see if the certificates are revoked.
 boolean isRunningMode()
           
 boolean isSigningCert(java.security.cert.X509Certificate cert)
          Checks if the given certificate is a signing certificate.
 IACL parseACL(java.lang.String resACLs)
          Parse ACL resource attributes
 void putPasswordCache(java.lang.String tag, java.lang.String pw)
          Puts a password entry into the single-sign on cache.
 void reinit(java.lang.String id)
           
 void setConfigSDSessionId(java.lang.String id)
           
 void setCSState(int mode)
           
 void setId(java.lang.String id)
          Sets the identifier of this subsystem.
 void setListOfVerifiedCerts(int size, long interval, long unknownStateInterval)
          Sets list of verified certificates
 void setServerCertNickname(java.lang.String newName)
          Sets the nickname of the server's server certificate.
 void setServerCertNickname(java.lang.String tokenName, java.lang.String nickName)
          Sets the nickname of the server's server certificate.
 void terminateRequests()
          Terminates all requests that are currently in process.
 void traceHashKey(java.lang.String type, java.lang.String key)
          Dump name/value pair debug information to debug file
 void traceHashKey(java.lang.String type, java.lang.String key, java.lang.String val)
           
 void traceHashKey(java.lang.String type, java.lang.String key, java.lang.String val, java.lang.String def)
           
 boolean verifySystemCertByNickname(java.lang.String nickname, java.lang.String certificateUsage)
          Verifies a system certificate by its nickname
 boolean verifySystemCertByTag(java.lang.String tag)
          Verifies a system certificate by its tag name as defined in .cert.list
 boolean verifySystemCerts()
          Verifies all system certificates
 
Methods inherited from interface com.netscape.certsrv.base.ISubsystem
getConfigStore, init, shutdown, startup
 

Method Detail

getId

java.lang.String getId()
Gets this ID .

Specified by:
getId in interface ISubsystem
Returns:
CMS engine identifier

setId

void setId(java.lang.String id)
           throws EBaseException
Sets the identifier of this subsystem. Should never be called. Returns error.

Specified by:
setId in interface ISubsystem
Parameters:
id - CMS engine identifier
Throws:
EBaseException - failed to set id

getpid

int getpid()
Retrieves the process id of this server.

Returns:
process id of the server

reinit

void reinit(java.lang.String id)
            throws EBaseException
Throws:
EBaseException

getCSState

int getCSState()

setCSState

void setCSState(int mode)

isPreOpMode

boolean isPreOpMode()

isRunningMode

boolean isRunningMode()

getInstanceDir

java.lang.String getInstanceDir()
Retrieves the instance roort path of this server.

Returns:
instance directory path name

getCurrentDate

java.util.Date getCurrentDate()
Returns a server wide system time. Plugins should call this method to retrieve system time.

Returns:
current time

getStartupTime

long getStartupTime()
Retrieves time server started up.

Returns:
last startup time

isInRunningState

boolean isInRunningState()
Is the server in running state. After server startup, the server will be initialization state first. After the initialization state, the server will be in the running state.

Returns:
true if the server is in the running state

getSubsystemNames

java.util.Enumeration getSubsystemNames()
Returns the names of all the registered subsystems.

Returns:
a list of string-based subsystem names

getSubsystems

java.util.Enumeration getSubsystems()
Returns all the registered subsystems.

Returns:
a list of ISubsystem-based subsystems

getSubsystem

ISubsystem getSubsystem(java.lang.String name)
Retrieves the registered subsytem with the given name.

Parameters:
name - subsystem name
Returns:
subsystem of the given name

getLogger

ILogger getLogger()
Returns the logger of the current server. The logger can be used to log critical informational or critical error messages.

Returns:
logger

getSignedAuditLogger

ILogger getSignedAuditLogger()
Returns the signed audit logger of the current server. This logger can be used to log critical informational or critical error messages.

Returns:
signed audit logger

debug

void debug(byte[] data)
Puts data of an byte array into the debug file.

Parameters:
data - byte array to be recorded in the debug file

debug

void debug(java.lang.String msg)
Puts a message into the debug file.

Parameters:
msg - debugging message

debug

void debug(int level,
           java.lang.String msg)
Puts a message into the debug file.

Parameters:
level - 0-10
msg - debugging message

debug

void debug(java.lang.Throwable e)
Puts an exception into the debug file.

Parameters:
e - exception

debugOn

boolean debugOn()
Checks if the debug mode is on or not.

Returns:
true if debug mode is on

debugStackTrace

void debugStackTrace()
Puts the current stack trace in the debug file.


traceHashKey

void traceHashKey(java.lang.String type,
                  java.lang.String key)
Dump name/value pair debug information to debug file


traceHashKey

void traceHashKey(java.lang.String type,
                  java.lang.String key,
                  java.lang.String val)

traceHashKey

void traceHashKey(java.lang.String type,
                  java.lang.String key,
                  java.lang.String val,
                  java.lang.String def)

getPKCS7

byte[] getPKCS7(java.util.Locale locale,
                IRequest req)

getUserMessage

java.lang.String getUserMessage(java.util.Locale locale,
                                java.lang.String msgID)
Retrieves the localized user message from UserMessages.properties.

Parameters:
locale - end-user locale
msgID - message id defined in UserMessages.properties
Returns:
localized user message

getUserMessage

java.lang.String getUserMessage(java.util.Locale locale,
                                java.lang.String msgID,
                                java.lang.String[] p)
Retrieves the localized user message from UserMessages.properties.

Parameters:
locale - end-user locale
msgID - message id defined in UserMessages.properties
p - an array of parameters
Returns:
localized user message

getUserMessage

java.lang.String getUserMessage(java.util.Locale locale,
                                java.lang.String msgID,
                                java.lang.String p1)
Retrieves the localized user message from UserMessages.properties.

Parameters:
locale - end-user locale
msgID - message id defined in UserMessages.properties
p1 - 1st parameter
Returns:
localized user message

getUserMessage

java.lang.String getUserMessage(java.util.Locale locale,
                                java.lang.String msgID,
                                java.lang.String p1,
                                java.lang.String p2)
Retrieves the localized user message from UserMessages.properties.

Parameters:
locale - end-user locale
msgID - message id defined in UserMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
Returns:
localized user message

getUserMessage

java.lang.String getUserMessage(java.util.Locale locale,
                                java.lang.String msgID,
                                java.lang.String p1,
                                java.lang.String p2,
                                java.lang.String p3)
Retrieves the localized user message from UserMessages.properties.

Parameters:
locale - end-user locale
msgID - message id defined in UserMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
p3 - 3rd parameter
Returns:
localized user message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String[] p)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p - an array of parameters
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1,
                               java.lang.String p2)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1,
                               java.lang.String p2,
                               java.lang.String p3)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
p3 - 3rd parameter
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1,
                               java.lang.String p2,
                               java.lang.String p3,
                               java.lang.String p4)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
p3 - 3rd parameter
p4 - 4th parameter
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1,
                               java.lang.String p2,
                               java.lang.String p3,
                               java.lang.String p4,
                               java.lang.String p5)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
p3 - 3rd parameter
p4 - 4th parameter
p5 - 5th parameter
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1,
                               java.lang.String p2,
                               java.lang.String p3,
                               java.lang.String p4,
                               java.lang.String p5,
                               java.lang.String p6)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
p3 - 3rd parameter
p4 - 4th parameter
p5 - 5th parameter
p6 - 6th parameter
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1,
                               java.lang.String p2,
                               java.lang.String p3,
                               java.lang.String p4,
                               java.lang.String p5,
                               java.lang.String p6,
                               java.lang.String p7)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
p3 - 3rd parameter
p4 - 4th parameter
p5 - 5th parameter
p6 - 6th parameter
p7 - 7th parameter
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1,
                               java.lang.String p2,
                               java.lang.String p3,
                               java.lang.String p4,
                               java.lang.String p5,
                               java.lang.String p6,
                               java.lang.String p7,
                               java.lang.String p8)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
p3 - 3rd parameter
p4 - 4th parameter
p5 - 5th parameter
p6 - 6th parameter
p7 - 7th parameter
p8 - 8th parameter
Returns:
localized log message

getLogMessage

java.lang.String getLogMessage(java.lang.String msgID,
                               java.lang.String p1,
                               java.lang.String p2,
                               java.lang.String p3,
                               java.lang.String p4,
                               java.lang.String p5,
                               java.lang.String p6,
                               java.lang.String p7,
                               java.lang.String p8,
                               java.lang.String p9)
Retrieves the centralized log message from LogMessages.properties.

Parameters:
msgID - message id defined in LogMessages.properties
p1 - 1st parameter
p2 - 2nd parameter
p3 - 3rd parameter
p4 - 4th parameter
p5 - 5th parameter
p6 - 6th parameter
p7 - 7th parameter
p8 - 8th parameter
p9 - 9th parameter
Returns:
localized log message

parseACL

IACL parseACL(java.lang.String resACLs)
              throws EACLsException
Parse ACL resource attributes

Parameters:
resACLs - same format as the resourceACLs attribute:
     ::
      () 
 
Returns:
an ACL instance built from the parsed resACLs
Throws:
EACLsException - ACL related parsing errors for resACLs

createCRLIssuingPointRecord

ICRLIssuingPointRecord createCRLIssuingPointRecord(java.lang.String id,
                                                   java.math.BigInteger crlNumber,
                                                   java.lang.Long crlSize,
                                                   java.util.Date thisUpdate,
                                                   java.util.Date nextUpdate)
Creates an issuing poing record.

Returns:
issuing record

getCRLIssuingPointRecordName

java.lang.String getCRLIssuingPointRecordName()
Retrieves the default CRL issuing point record name.

Returns:
CRL issuing point record name

getFingerPrint

java.lang.String getFingerPrint(java.security.cert.Certificate cert)
                                throws java.security.cert.CertificateEncodingException,
                                       java.security.NoSuchAlgorithmException
Returns the finger print of the given certificate.

Parameters:
cert - certificate
Returns:
finger print of certificate
Throws:
java.security.cert.CertificateEncodingException
java.security.NoSuchAlgorithmException

getFingerPrints

java.lang.String getFingerPrints(java.security.cert.Certificate cert)
                                 throws java.security.NoSuchAlgorithmException,
                                        java.security.cert.CertificateEncodingException
Returns the finger print of the given certificate.

Parameters:
cert - certificate
Returns:
finger print of certificate
Throws:
java.security.NoSuchAlgorithmException
java.security.cert.CertificateEncodingException

getFingerPrints

java.lang.String getFingerPrints(byte[] certDer)
                                 throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

createRepositoryRecord

IRepositoryRecord createRepositoryRecord()
Creates a repository record in the internal database.

Returns:
repository record

getHttpPKIMessage

IPKIMessage getHttpPKIMessage()
Creates a HTTP PKI Message that can be sent to a remote authority.

Returns:
a new PKI Message for remote authority

getHttpRequestEncoder

IRequestEncoder getHttpRequestEncoder()
Creates a request encoder. A request cannot be sent to the remote authority in its regular format.

Returns:
a request encoder

BtoA

java.lang.String BtoA(byte[] data)
Converts a BER-encoded byte array into a MIME-64 encoded string.

Parameters:
data - data in byte array format
Returns:
base-64 encoding for the data

AtoB

byte[] AtoB(java.lang.String data)
Converts a MIME-64 encoded string into a BER-encoded byte array.

Parameters:
data - base-64 encoding for the data
Returns:
data data in byte array format

getEncodedCert

java.lang.String getEncodedCert(java.security.cert.X509Certificate cert)
Retrieves the certifcate in MIME-64 encoded format with header and footer.

Parameters:
cert - certificate
Returns:
base-64 format certificate

getPrettyPrintFormat

IPrettyPrintFormat getPrettyPrintFormat(java.lang.String delimiter)
Retrieves the certificate pretty print handler.

Parameters:
delimiter - delimiter
Returns:
certificate pretty print handler

getExtPrettyPrint

IExtPrettyPrint getExtPrettyPrint(netscape.security.x509.Extension e,
                                  int indent)
Retrieves the extension pretty print handler.

Parameters:
e - extension
indent - indentation
Returns:
extension pretty print handler

getCertPrettyPrint

ICertPrettyPrint getCertPrettyPrint(java.security.cert.X509Certificate cert)
Retrieves the certificate pretty print handler.

Parameters:
cert - certificate
Returns:
certificate pretty print handler

getCRLPrettyPrint

ICRLPrettyPrint getCRLPrettyPrint(java.security.cert.X509CRL crl)
Retrieves the CRL pretty print handler.

Parameters:
crl - CRL
Returns:
CRL pretty print handler

getCRLCachePrettyPrint

ICRLPrettyPrint getCRLCachePrettyPrint(ICRLIssuingPoint ip)
Retrieves the CRL cache pretty print handler.

Parameters:
ip - CRL issuing point
Returns:
CRL pretty print handler

getLdapConnInfo

ILdapConnInfo getLdapConnInfo(IConfigStore config)
                              throws EBaseException,
                                     ELdapException
Retrieves the ldap connection information from the configuration store.

Parameters:
config - configuration parameters of ldap connection
Returns:
a LDAP connection info
Throws:
EBaseException
ELdapException

getLdapJssSSLSocketFactory

netscape.ldap.LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory(java.lang.String certNickname)
Creates a LDAP SSL socket with the given nickname. The certificate associated with the nickname will be used for client authentication.

Parameters:
certNickname - nickname of client certificate
Returns:
LDAP SSL socket factory

getLdapJssSSLSocketFactory

netscape.ldap.LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory()
Creates a LDAP SSL socket.

Returns:
LDAP SSL socket factory

getLdapAuthInfo

ILdapAuthInfo getLdapAuthInfo()
Creates a LDAP Auth Info object.

Returns:
LDAP authentication info

getLdapBoundConnFactory

ILdapConnFactory getLdapBoundConnFactory()
                                         throws ELdapException
Retrieves the LDAP connection factory.

Returns:
bound LDAP connection pool
Throws:
ELdapException

getBoundConnection

netscape.ldap.LDAPConnection getBoundConnection(java.lang.String host,
                                                int port,
                                                int version,
                                                netscape.ldap.LDAPSSLSocketFactoryExt fac,
                                                java.lang.String bindDN,
                                                java.lang.String bindPW)
                                                throws netscape.ldap.LDAPException
Throws:
netscape.ldap.LDAPException

getLdapAnonConnFactory

ILdapConnFactory getLdapAnonConnFactory()
                                        throws ELdapException
Retrieves the LDAP connection factory.

Returns:
anonymous LDAP connection pool
Throws:
ELdapException

getPasswordChecker

IPasswordCheck getPasswordChecker()
Retrieves the password check.

Returns:
default password checker

putPasswordCache

void putPasswordCache(java.lang.String tag,
                      java.lang.String pw)
Puts a password entry into the single-sign on cache.

Parameters:
tag - password tag
pw - password

getPasswordCallback

org.mozilla.jss.util.PasswordCallback getPasswordCallback()
Retrieves the password callback.

Returns:
default password callback

getServerCertNickname

java.lang.String getServerCertNickname()
Retrieves the nickname of the server's server certificate.

Returns:
nickname of the server certificate

setServerCertNickname

void setServerCertNickname(java.lang.String tokenName,
                           java.lang.String nickName)
Sets the nickname of the server's server certificate.

Parameters:
tokenName - name of token where the certificate is located
nickName - name of server certificate

setServerCertNickname

void setServerCertNickname(java.lang.String newName)
Sets the nickname of the server's server certificate.

Parameters:
newName - new nickname of server certificate

getEEHost

java.lang.String getEEHost()
Retrieves the host name of the server's secure end entity service.

Returns:
host name of end-entity service

getEENonSSLHost

java.lang.String getEENonSSLHost()
Retrieves the host name of the server's non-secure end entity service.

Returns:
host name of end-entity non-secure service

getEENonSSLIP

java.lang.String getEENonSSLIP()
Retrieves the IP address of the server's non-secure end entity service.

Returns:
ip address of end-entity non-secure service

getEENonSSLPort

java.lang.String getEENonSSLPort()
Retrieves the port number of the server's non-secure end entity service.

Returns:
port of end-entity non-secure service

getEESSLHost

java.lang.String getEESSLHost()
Retrieves the host name of the server's secure end entity service.

Returns:
port of end-entity secure service

getEESSLIP

java.lang.String getEESSLIP()
Retrieves the IP address of the server's secure end entity service.

Returns:
ip address of end-entity secure service

getEESSLPort

java.lang.String getEESSLPort()
Retrieves the port number of the server's secure end entity service.

Returns:
port of end-entity secure service

getEEClientAuthSSLPort

java.lang.String getEEClientAuthSSLPort()
Retrieves the port number of the server's client auth secure end entity service.

Returns:
port of end-entity client auth secure service

getAgentHost

java.lang.String getAgentHost()
Retrieves the host name of the server's agent service.

Returns:
host name of agent service

getAgentIP

java.lang.String getAgentIP()
Retrieves the IP address of the server's agent service.

Returns:
ip address of agent service

getAgentPort

java.lang.String getAgentPort()
Retrieves the port number of the server's agent service.

Returns:
port of agent service

getAdminHost

java.lang.String getAdminHost()
Retrieves the host name of the server's administration service.

Returns:
host name of administration service

getAdminIP

java.lang.String getAdminIP()
Retrieves the IP address of the server's administration service.

Returns:
ip address of administration service

getAdminPort

java.lang.String getAdminPort()
Retrieves the port number of the server's administration service.

Returns:
port of administration service

verifySystemCerts

boolean verifySystemCerts()
Verifies all system certificates

Returns:
true if all passed, false otherwise

verifySystemCertByTag

boolean verifySystemCertByTag(java.lang.String tag)
Verifies a system certificate by its tag name as defined in .cert.list

Returns:
true if passed, false otherwise

verifySystemCertByNickname

boolean verifySystemCertByNickname(java.lang.String nickname,
                                   java.lang.String certificateUsage)
Verifies a system certificate by its nickname

Returns:
true if passed, false otherwise

getCertificateUsage

org.mozilla.jss.CryptoManager.CertificateUsage getCertificateUsage(java.lang.String certusage)
get the CertificateUsage as defined in JSS CryptoManager

Returns:
CertificateUsage as defined in JSS CryptoManager

isSigningCert

boolean isSigningCert(java.security.cert.X509Certificate cert)
Checks if the given certificate is a signing certificate.

Parameters:
cert - certificate
Returns:
true if the given certificate is a signing certificate

isEncryptionCert

boolean isEncryptionCert(java.security.cert.X509Certificate cert)
Checks if the given certificate is an encryption certificate.

Parameters:
cert - certificate
Returns:
true if the given certificate is an encryption certificate

getDefaultX509CertInfo

netscape.security.x509.X509CertInfo getDefaultX509CertInfo()
Retrieves the default X.509 certificate template.

Returns:
default certificate template

getEmailFormProcessor

IEmailFormProcessor getEmailFormProcessor()
Retrieves the email form processor.

Returns:
email form processor

getEmailTemplate

IEmailTemplate getEmailTemplate(java.lang.String path)
Retrieves the email form template.

Returns:
email template

getMailNotification

IMailNotification getMailNotification()
Retrieves the email notification handler.

Returns:
email notification

getEmailResolverKeys

IEmailResolverKeys getEmailResolverKeys()
Retrieves the email key resolver.

Returns:
email key resolver

getReqCertSANameEmailResolver

IEmailResolver getReqCertSANameEmailResolver()
Retrieves the email resolver that checks for subjectAlternateName.

Returns:
email key resolver

checkOID

netscape.security.util.ObjectIdentifier checkOID(java.lang.String attrName,
                                                 java.lang.String value)
                                                 throws EBaseException
Checks if the given OID is valid.

Parameters:
attrName - attribute name
value - attribute value
Returns:
object identifier of the given attrName
Throws:
EBaseException

form_GeneralNameAsConstraints

netscape.security.x509.GeneralName form_GeneralNameAsConstraints(java.lang.String generalNameChoice,
                                                                 java.lang.String value)
                                                                 throws EBaseException
Creates a general name constraints.

Parameters:
generalNameChoice - type of general name
value - general name string
Returns:
general name object
Throws:
EBaseException - failed to create general name constraint

form_GeneralName

netscape.security.x509.GeneralName form_GeneralName(java.lang.String generalNameChoice,
                                                    java.lang.String value)
                                                    throws EBaseException
Creates a general name.

Parameters:
generalNameChoice - type of general name
value - general name string
Returns:
general name object
Throws:
EBaseException - failed to create general name

getGeneralNameConfigDefaultParams

void getGeneralNameConfigDefaultParams(java.lang.String name,
                                       boolean isValueConfigured,
                                       java.util.Vector params)
Retrieves default general name configuration.

Parameters:
name - configuration name
isValueConfigured - true if value is configured
params - configuration parameters
Throws:
EBaseException - failed to create subject alt name configuration

getGeneralNamesConfigDefaultParams

void getGeneralNamesConfigDefaultParams(java.lang.String name,
                                        boolean isValueConfigured,
                                        java.util.Vector params)
Retrieves default general names configuration.

Parameters:
name - configuration name
isValueConfigured - true if value is configured
params - configuration parameters
Throws:
EBaseException - failed to create subject alt name configuration

getGeneralNameConfigExtendedPluginInfo

void getGeneralNameConfigExtendedPluginInfo(java.lang.String name,
                                            boolean isValueConfigured,
                                            java.util.Vector info)
Retrieves extended plugin info for general name configuration.

Parameters:
name - configuration name
isValueConfigured - true if value is configured
info - configuration parameters
Throws:
EBaseException - failed to create subject alt name configuration

getGeneralNamesConfigExtendedPluginInfo

void getGeneralNamesConfigExtendedPluginInfo(java.lang.String name,
                                             boolean isValueConfigured,
                                             java.util.Vector info)
Retrieves extended plugin info for general name configuration.

Parameters:
name - configuration name
isValueConfigured - true if value is configured
info - configuration parameters
Throws:
EBaseException - failed to create subject alt name configuration

createGeneralNamesConfig

IGeneralNamesConfig createGeneralNamesConfig(java.lang.String name,
                                             IConfigStore config,
                                             boolean isValueConfigured,
                                             boolean isPolicyEnabled)
                                             throws EBaseException
Created general names configuration.

Parameters:
name - configuration name
config - configuration store
isValueConfigured - true if value is configured
isPolicyEnabled - true if policy is enabled
Throws:
EBaseException - failed to create subject alt name configuration

createGeneralNameAsConstraintsConfig

IGeneralNameAsConstraintsConfig createGeneralNameAsConstraintsConfig(java.lang.String name,
                                                                     IConfigStore config,
                                                                     boolean isValueConfigured,
                                                                     boolean isPolicyEnabled)
                                                                     throws EBaseException
Created general name constraints configuration.

Parameters:
name - configuration name
config - configuration store
isValueConfigured - true if value is configured
isPolicyEnabled - true if policy is enabled
Throws:
EBaseException - failed to create subject alt name configuration

createGeneralNamesAsConstraintsConfig

IGeneralNamesAsConstraintsConfig createGeneralNamesAsConstraintsConfig(java.lang.String name,
                                                                       IConfigStore config,
                                                                       boolean isValueConfigured,
                                                                       boolean isPolicyEnabled)
                                                                       throws EBaseException
Created general name constraints configuration.

Parameters:
name - configuration name
config - configuration store
isValueConfigured - true if value is configured
isPolicyEnabled - true if policy is enabled
Throws:
EBaseException - failed to create subject alt name configuration

getSubjAltNameConfigDefaultParams

void getSubjAltNameConfigDefaultParams(java.lang.String name,
                                       java.util.Vector params)
Get default parameters for subject alt name configuration.

Parameters:
name - configuration name
params - configuration parameters

getSubjAltNameConfigExtendedPluginInfo

void getSubjAltNameConfigExtendedPluginInfo(java.lang.String name,
                                            java.util.Vector params)
Get extended plugin info for subject alt name configuration.

Parameters:
name - configuration name
params - configuration parameters

createSubjAltNameConfig

ISubjAltNameConfig createSubjAltNameConfig(java.lang.String name,
                                           IConfigStore config,
                                           boolean isValueConfigured)
                                           throws EBaseException
Creates subject alt name configuration.

Parameters:
name - configuration name
config - configuration store
isValueConfigured - true if value is configured
Throws:
EBaseException - failed to create subject alt name configuration

getHttpConnection

IHttpConnection getHttpConnection(IRemoteAuthority authority,
                                  com.netscape.cmsutil.net.ISocketFactory factory)
Retrieves the HTTP Connection for use with connector.

Parameters:
authority - remote authority
factory - socket factory
Returns:
http connection to the remote authority

getHttpConnection

IHttpConnection getHttpConnection(IRemoteAuthority authority,
                                  com.netscape.cmsutil.net.ISocketFactory factory,
                                  int timeout)
Retrieves the HTTP Connection for use with connector.

Parameters:
authority - remote authority
factory - socket factory
timeout - return error if connection cannot be established within the timeout period
Returns:
http connection to the remote authority

getResender

IResender getResender(IAuthority authority,
                      java.lang.String nickname,
                      IRemoteAuthority remote,
                      int interval)
Retrieves the request sender for use with connector.

Parameters:
authority - local authority
nickname - nickname of the client certificate
remote - remote authority
interval - timeout interval
Returns:
resender

getCommandQueue

ICommandQueue getCommandQueue()
Retrieves command queue

Returns:
command queue

disableRequests

void disableRequests()
Blocks all new incoming requests.


terminateRequests

void terminateRequests()
Terminates all requests that are currently in process.


areRequestsDisabled

boolean areRequestsDisabled()
Checks to ensure that all new incoming requests have been blocked. This method is used for reentrancy protection.

Returns:
true or false

createFileConfigStore

IConfigStore createFileConfigStore(java.lang.String path)
                                   throws EBaseException
Create configuration file.

Parameters:
path - configuration path
Returns:
configuration store
Throws:
EBaseException - failed to create file

createArgBlock

IArgBlock createArgBlock()
Creates argument block.


createArgBlock

IArgBlock createArgBlock(java.lang.String realm,
                         java.util.Hashtable httpReq)
Creates argument block.


createArgBlock

IArgBlock createArgBlock(java.util.Hashtable httpReq)
Creates argument block.


isRevoked

boolean isRevoked(java.security.cert.X509Certificate[] certificates)
Checks against the local certificate repository to see if the certificates are revoked.

Parameters:
certificates - certificates
Returns:
true if certificate is revoked in the local certificate repository

setListOfVerifiedCerts

void setListOfVerifiedCerts(int size,
                            long interval,
                            long unknownStateInterval)
Sets list of verified certificates

Parameters:
size - size of verified certificates list
interval - interval in which certificate is not recheck against local certificate repository
unknownStateInterval - interval in which certificate may not recheck against local certificate repository

forceShutdown

void forceShutdown()
Performs graceful shutdown of CMS. Subsystems are shutdown in reverse order. Exceptions are ignored.


getPasswordStore

com.netscape.cmsutil.password.IPasswordStore getPasswordStore()

getSecurityDomainSessionTable

ISecurityDomainSessionTable getSecurityDomainSessionTable()

setConfigSDSessionId

void setConfigSDSessionId(java.lang.String id)

getConfigSDSessionId

java.lang.String getConfigSDSessionId()