public class CertificateInfo
extends java.lang.Object
ICertManagerRunTime.generateUserCertKey(String,CertificateInfo,String,boolean).| Modifier and Type | Class and Description |
|---|---|
static class |
CertificateInfo.PubKeyAlg
Enum to identify public key algorithms.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MD5 |
static int |
SHA1 |
static int |
SHA256 |
static int |
SHA384 |
static int |
SHA512 |
| Constructor and Description |
|---|
CertificateInfo() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCommonName()
Get the certificate subject's common name.
|
java.lang.String |
getCountry()
Get the certificate subject's country.
|
java.lang.String |
getCrlDistributionPoint()
Get the certificate CRL Distribution Point URI.
|
java.lang.String |
getEmailAddress()
Get the certificate subject's email address.
|
java.lang.String |
getLocality()
Get the certificate subject's locality.
|
java.lang.String |
getOrganization()
Get the certificate subject's organization.
|
java.lang.String |
getOrganizationalUnit()
Get the certificate subject's organizational unit.
|
CertificateInfo.PubKeyAlg |
getPublicKeyAlgorithm()
Get public key algorithm.
|
int |
getSignatureAlgorithm()
Get the signature algorithm.
|
java.lang.String |
getStateOrProvince()
Get the certificate subject's state or province.
|
int |
getStrength()
Get the private key strength in bytes
|
int |
getValidFor()
Get the certificate's validity period in months.
|
boolean |
isAddCrlDistributionPoint()
Indicates whether the certificate should include a CRL Distribution Points extension.
|
boolean |
isAuthorityKeyIdentifier()
Indicates whether the certificate should include the Authority Key Identifier extension.
|
boolean |
isClientAuth()
Indicates whether the certificate's key usage should include client authentication.
|
boolean |
isCrlSign()
Indicates whether the certificate's key usage should include CRL signing.
|
boolean |
isDigitalSignature()
Indicates whether the certificate's key usage should include digital signatures.
|
boolean |
isKeyCertSign()
Indicates whether the certificate's key usage should include key signing.
|
boolean |
isKeyEncipherment()
Indicates whether the certificate's key usage should include key encipherment.
|
boolean |
isServerAuth()
Indicates whether the certificate's key usage should include server authentication.
|
boolean |
isSubjectKeyIdentifier()
Indicates whether the certificate should include the Subject Key Identifier extension.
|
void |
setAddCrlDistributionPoint(boolean addCrlDistributionPoint)
Sets the indicator as to whether the certificate should include a CRL Distribution Points extension.
|
void |
setAuthorityKeyIdentifier(boolean authorityKeyIdentifier)
Set the certificate's Authority Key Identifier extension as a means of identifying the public key
corresponding to the private key used to sign a certificate.
|
void |
setClientAuth(boolean clientAuth)
Set the certificate's extended key usage to include client authentication.
|
void |
setCommonName(java.lang.String commonName)
Set the certificate subject's common name.
|
void |
setCountry(java.lang.String country)
Set the certificate subject's country.
|
void |
setCrlDistributionPoint(java.lang.String crlDistributionPoint)
Set the CRL Distribution Point URI to be added to certificate extension.
|
void |
setCrlSign(boolean crlSign)
Set the certificate's key usage to include CRL signing.
|
void |
setDigitalSignature(boolean digitalSignature)
Set the certificate's key usage to include digital signatures.
|
void |
setEmailAddress(java.lang.String emailAddress)
Set the certificate subject's email address.
|
void |
setKeyCertSign(boolean keyCertSign)
Set the certificate's key usage to include key signing - used when creating a CA certificate.
|
void |
setKeyEncipherment(boolean keyEncipherment)
Set the certificate's key usage to include key encipherment.
|
void |
setLocality(java.lang.String locality)
Set the certificate subject's locality (e.g. city).
|
void |
setOrganization(java.lang.String organization)
Set the certificate subject's organization.
|
void |
setOrganizationalUnit(java.lang.String organizationalUnit)
Set the certificate subject's organizational unit.
|
void |
setPublicKeyAlgorithm(CertificateInfo.PubKeyAlg publicKeyAlgorithm)
Set public key algorithm
|
void |
setServerAuth(boolean serverAuth)
Set the certificate's extended key usage to include server authentication.
|
void |
setSignatureAlgorithm(int signatureAlgorithm)
Set the signature algorithm.
|
void |
setStateOrProvince(java.lang.String stateOrProvince)
Set the certificate subject's state or province.
|
void |
setStrength(int strength)
Set the private key strength in bytes.
|
void |
setSubjectKeyIdentifier(boolean subjectKeyIdentifier)
Set the certificate's Subject Key Identifier extension as a means of identifying the particular
public key being used.
|
void |
setValidFor(int validFor)
Set the certificate's validity period in months.
|
public static final int MD5
public static final int SHA1
public static final int SHA256
public static final int SHA384
public static final int SHA512
public void setCommonName(java.lang.String commonName)
commonName - the certificate subject's common namepublic void setEmailAddress(java.lang.String emailAddress)
emailAddress - the certificate subject's email addresspublic void setOrganizationalUnit(java.lang.String organizationalUnit)
organizationalUnit - the certificate subject's organizational unitpublic void setOrganization(java.lang.String organization)
organization - the certificate subject's organizationpublic void setLocality(java.lang.String locality)
locality - the certificate subject's localitypublic void setStateOrProvince(java.lang.String stateOrProvince)
stateOrProvince - the certificate subject's state or provincepublic void setCountry(java.lang.String country)
country - the certificate subject's countrypublic void setCrlDistributionPoint(java.lang.String crlDistributionPoint)
crlDistributionPoint - the CRL distribution point URLpublic void setValidFor(int validFor)
validFor - the certificate's validity period in monthspublic void setSignatureAlgorithm(int signatureAlgorithm)
signatureAlgorithm - the signature algorithm, either MD5 (default), SHA1, SHA256, SHA384, or SHA512public void setDigitalSignature(boolean digitalSignature)
digitalSignature - true if the certificate's key usage should include digital signaturespublic void setKeyEncipherment(boolean keyEncipherment)
keyEncipherment - true if the certificate's key usage should include key enciphermentpublic void setServerAuth(boolean serverAuth)
serverAuth - true if the certificate's extended key usage should include server authenticationpublic void setClientAuth(boolean clientAuth)
clientAuth - true if the certificate's extended key usage should include client authenticationpublic void setSubjectKeyIdentifier(boolean subjectKeyIdentifier)
subjectKeyIdentifier - true if the certificate should include the Subject Key Identifier extensionpublic void setAuthorityKeyIdentifier(boolean authorityKeyIdentifier)
authorityKeyIdentifier - true if the certificate should include the Authority Key Identifier extensionpublic void setCrlSign(boolean crlSign)
crlSign - true if the certificate's key usage should include CRL signing.public void setKeyCertSign(boolean keyCertSign)
keyCertSign - true if the certificate's key usage should include key signing.public void setAddCrlDistributionPoint(boolean addCrlDistributionPoint)
addCrlDistributionPoint - true if the certificate should include the CRL Distribution Points extensionpublic void setStrength(int strength)
strength - the private key strengthpublic java.lang.String getCommonName()
public java.lang.String getEmailAddress()
public java.lang.String getOrganizationalUnit()
public java.lang.String getOrganization()
public java.lang.String getLocality()
public java.lang.String getStateOrProvince()
public java.lang.String getCountry()
public java.lang.String getCrlDistributionPoint()
public int getValidFor()
public int getSignatureAlgorithm()
public boolean isDigitalSignature()
public boolean isKeyEncipherment()
public boolean isServerAuth()
public boolean isClientAuth()
public boolean isSubjectKeyIdentifier()
public boolean isAuthorityKeyIdentifier()
public boolean isCrlSign()
public boolean isKeyCertSign()
public boolean isAddCrlDistributionPoint()
public int getStrength()
public CertificateInfo.PubKeyAlg getPublicKeyAlgorithm()
public void setPublicKeyAlgorithm(CertificateInfo.PubKeyAlg publicKeyAlgorithm)
publicKeyAlgorithm - public key algorithm