public abstract class EnrollDefault extends PolicyDefault
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GN_ANY_NAME |
static java.lang.String |
GN_DIRECTORY_NAME |
static java.lang.String |
GN_DNS_NAME |
static java.lang.String |
GN_EDI_NAME |
static java.lang.String |
GN_IP_NAME |
static java.lang.String |
GN_OID_NAME |
static java.lang.String |
GN_RFC822_NAME |
static java.lang.String |
GN_URI_NAME |
static org.slf4j.Logger |
logger |
protected IConfigStore |
mConfig |
protected java.util.Vector<java.lang.String> |
mConfigNames |
protected java.util.Vector<java.lang.String> |
mValueNames |
static java.lang.String |
PROP_NAME |
Constructor and Description |
---|
EnrollDefault() |
Modifier and Type | Method and Description |
---|---|
void |
addConfigName(java.lang.String name) |
protected void |
addExtension(java.lang.String name,
org.mozilla.jss.netscape.security.x509.Extension ext,
org.mozilla.jss.netscape.security.x509.X509CertInfo info) |
void |
addValueName(java.lang.String name) |
protected static java.lang.String |
buildRecords(java.util.Vector<NameValuePairs> recs) |
protected void |
deleteExtension(java.lang.String extID,
org.mozilla.jss.netscape.security.x509.X509CertInfo info) |
protected boolean |
getBoolean(java.lang.String value) |
byte[] |
getBytes(java.lang.String string)
Converts string containing pairs of characters in the range of '0'
to '9', 'a' to 'f' to an array of bytes such that each pair of
characters in the string represents an individual byte
|
java.lang.String |
getConfig(java.lang.String name)
Retrieves configuration parameter by name.
|
java.lang.String |
getConfig(java.lang.String name,
java.lang.String defval)
Get constraint parameter in profile configuration.
|
protected boolean |
getConfigBoolean(java.lang.String value) |
IDescriptor |
getConfigDescriptor(java.util.Locale locale,
java.lang.String name)
Returns the descriptors of configuration parameter.
|
protected int |
getConfigInt(java.lang.String value) |
java.util.Enumeration<java.lang.String> |
getConfigNames()
Returns a list of configuration parameter names.
|
IConfigStore |
getConfigStore()
Retrieves the configuration store of this default.
|
protected org.mozilla.jss.netscape.security.x509.Extension |
getExtension(java.lang.String name,
org.mozilla.jss.netscape.security.x509.CertificateExtensions exts) |
protected org.mozilla.jss.netscape.security.x509.Extension |
getExtension(java.lang.String name,
org.mozilla.jss.netscape.security.x509.X509CertInfo info) |
protected static java.lang.String |
getGeneralNameType(org.mozilla.jss.netscape.security.x509.GeneralName gn) |
protected static java.lang.String |
getGeneralNameValue(org.mozilla.jss.netscape.security.x509.GeneralName gn) |
protected int |
getInt(java.lang.String value) |
java.util.Locale |
getLocale(IRequest request) |
java.lang.String |
getName(java.util.Locale locale)
Retrieves the localizable name of this policy.
|
abstract java.lang.String |
getText(java.util.Locale locale)
Retrieves the localizable description of this policy.
|
java.lang.String |
getValue(java.lang.String name,
java.util.Locale locale,
IRequest request)
Retrieves the value of the given value
property by name.
|
abstract java.lang.String |
getValue(java.lang.String name,
java.util.Locale locale,
org.mozilla.jss.netscape.security.x509.X509CertInfo info)
Retrieves certificate template values and returns them to
the approval page.
|
IDescriptor |
getValueDescriptor(java.lang.String name) |
java.util.Enumeration<java.lang.String> |
getValueNames()
Retrieves a list of names of the property.
|
void |
init(IConfigStore config)
Initializes this default policy.
|
protected boolean |
isGeneralNameType(java.lang.String nameType) |
protected boolean |
isGeneralNameValid(java.lang.String name) |
protected boolean |
isOptional(java.lang.String value) |
boolean |
isValidOID(java.lang.String oid)
Check if a object identifier in string form is valid,
that is a string in the form n.n.n.n and der encode and decode-able.
|
protected java.lang.String |
mapPattern(IRequest request,
java.lang.String pattern) |
protected org.mozilla.jss.netscape.security.x509.GeneralNameInterface |
parseGeneralName(java.lang.String name) |
protected org.mozilla.jss.netscape.security.x509.GeneralNameInterface |
parseGeneralName(java.lang.String nameType,
java.lang.String nameValue) |
protected java.util.Vector<NameValuePairs> |
parseRecords(java.lang.String value) |
void |
populate(IRequest request)
Populates the request with this policy default.
|
abstract void |
populate(IRequest request,
org.mozilla.jss.netscape.security.x509.X509CertInfo info)
Populates attributes into the certificate template.
|
protected void |
refreshConfigAndValueNames() |
protected void |
replaceExtension(java.lang.String name,
org.mozilla.jss.netscape.security.x509.Extension ext,
org.mozilla.jss.netscape.security.x509.X509CertInfo info) |
void |
setConfig(java.lang.String name,
java.lang.String value)
Sets configuration parameter.
|
void |
setValue(java.lang.String name,
java.util.Locale locale,
IRequest request,
java.lang.String value)
Sets the value of the given value property by name.
|
abstract void |
setValue(java.lang.String name,
java.util.Locale locale,
org.mozilla.jss.netscape.security.x509.X509CertInfo info,
java.lang.String value)
Sets values from the approval page into certificate template.
|
java.lang.String |
toGeneralNameString(org.mozilla.jss.netscape.security.x509.GeneralNameInterface gn) |
java.lang.String |
toHexString(byte[] data) |
getValueDescriptor
public static org.slf4j.Logger logger
public static final java.lang.String PROP_NAME
public static final java.lang.String GN_RFC822_NAME
public static final java.lang.String GN_DNS_NAME
public static final java.lang.String GN_URI_NAME
public static final java.lang.String GN_IP_NAME
public static final java.lang.String GN_DIRECTORY_NAME
public static final java.lang.String GN_EDI_NAME
public static final java.lang.String GN_ANY_NAME
public static final java.lang.String GN_OID_NAME
protected IConfigStore mConfig
protected java.util.Vector<java.lang.String> mConfigNames
protected java.util.Vector<java.lang.String> mValueNames
public java.util.Enumeration<java.lang.String> getConfigNames()
IConfigTemplate
public IDescriptor getConfigDescriptor(java.util.Locale locale, java.lang.String name)
IConfigTemplate
locale
- user localename
- configuration parameter namepublic void addConfigName(java.lang.String name)
public void setConfig(java.lang.String name, java.lang.String value) throws EPropertyException
IConfigTemplate
name
- parameter namevalue
- parameter valueEPropertyException
- failed to set parameterpublic java.lang.String getConfig(java.lang.String name)
IConfigTemplate
public java.lang.String getConfig(java.lang.String name, java.lang.String defval)
name
- parameter namedefval
- default value if parameter does not existpublic void init(IConfigStore config) throws EProfileException
PolicyDefault
init
in class PolicyDefault
config
- configuration store for this defaultEProfileException
- failed to initializepublic abstract java.lang.String getText(java.util.Locale locale)
getText
in class PolicyDefault
locale
- locale of the end userpublic IConfigStore getConfigStore()
PolicyDefault
getConfigStore
in class PolicyDefault
public java.lang.String getName(java.util.Locale locale)
PolicyDefault
getName
in class PolicyDefault
locale
- locale of the end userpublic abstract void populate(IRequest request, org.mozilla.jss.netscape.security.x509.X509CertInfo info) throws EProfileException
request
- enrollment requestinfo
- certificate templateEProfileException
- failed to populate attributes
into requestpublic abstract void setValue(java.lang.String name, java.util.Locale locale, org.mozilla.jss.netscape.security.x509.X509CertInfo info, java.lang.String value) throws EPropertyException
name
- name of the attributelocale
- user localeinfo
- certificate templatevalue
- attribute valueEProfileException
- failed to set attributes
into requestEPropertyException
public abstract java.lang.String getValue(java.lang.String name, java.util.Locale locale, org.mozilla.jss.netscape.security.x509.X509CertInfo info) throws EPropertyException
name
- name of the attributelocale
- user localeinfo
- certificate templateEProfileException
- failed to get attributes
from requestEPropertyException
public void populate(IRequest request) throws EProfileException
populate
in class PolicyDefault
request
- request to be populatedEProfileException
- failed to populatepublic void addValueName(java.lang.String name)
public java.util.Enumeration<java.lang.String> getValueNames()
PolicyDefault
getValueNames
in class PolicyDefault
public IDescriptor getValueDescriptor(java.lang.String name)
public void setValue(java.lang.String name, java.util.Locale locale, IRequest request, java.lang.String value) throws EPropertyException
setValue
in class PolicyDefault
name
- name of propertylocale
- locale of the end userrequest
- requestvalue
- value to be set in the given requestEPropertyException
- failed to set propertypublic java.lang.String getValue(java.lang.String name, java.util.Locale locale, IRequest request) throws EPropertyException
getValue
in class PolicyDefault
name
- name of propertylocale
- locale of the end userrequest
- requestEPropertyException
- failed to get propertypublic java.lang.String toHexString(byte[] data)
protected void refreshConfigAndValueNames()
protected void deleteExtension(java.lang.String extID, org.mozilla.jss.netscape.security.x509.X509CertInfo info) throws java.lang.Exception
java.lang.Exception
protected org.mozilla.jss.netscape.security.x509.Extension getExtension(java.lang.String name, org.mozilla.jss.netscape.security.x509.X509CertInfo info)
protected org.mozilla.jss.netscape.security.x509.Extension getExtension(java.lang.String name, org.mozilla.jss.netscape.security.x509.CertificateExtensions exts)
protected void addExtension(java.lang.String name, org.mozilla.jss.netscape.security.x509.Extension ext, org.mozilla.jss.netscape.security.x509.X509CertInfo info) throws EProfileException
EProfileException
protected void replaceExtension(java.lang.String name, org.mozilla.jss.netscape.security.x509.Extension ext, org.mozilla.jss.netscape.security.x509.X509CertInfo info) throws EProfileException
EProfileException
protected boolean isOptional(java.lang.String value)
protected boolean getBoolean(java.lang.String value)
protected int getInt(java.lang.String value)
protected boolean getConfigBoolean(java.lang.String value)
protected int getConfigInt(java.lang.String value)
protected boolean isGeneralNameValid(java.lang.String name)
protected org.mozilla.jss.netscape.security.x509.GeneralNameInterface parseGeneralName(java.lang.String name) throws java.io.IOException
java.io.IOException
protected boolean isGeneralNameType(java.lang.String nameType)
protected org.mozilla.jss.netscape.security.x509.GeneralNameInterface parseGeneralName(java.lang.String nameType, java.lang.String nameValue) throws java.io.IOException
java.io.IOException
public byte[] getBytes(java.lang.String string)
public boolean isValidOID(java.lang.String oid)
oid
- object identifier string.protected static java.lang.String buildRecords(java.util.Vector<NameValuePairs> recs)
protected java.util.Vector<NameValuePairs> parseRecords(java.lang.String value) throws EPropertyException
EPropertyException
protected static java.lang.String getGeneralNameType(org.mozilla.jss.netscape.security.x509.GeneralName gn) throws EPropertyException
EPropertyException
protected static java.lang.String getGeneralNameValue(org.mozilla.jss.netscape.security.x509.GeneralName gn) throws EPropertyException
EPropertyException
public java.util.Locale getLocale(IRequest request)
public java.lang.String toGeneralNameString(org.mozilla.jss.netscape.security.x509.GeneralNameInterface gn)
protected java.lang.String mapPattern(IRequest request, java.lang.String pattern) throws java.io.IOException
java.io.IOException