com.ibm.security.certclient.util
Class PkCASetUp
- java.lang.Object
com.ibm.security.certclient.util.PkCASetUp
All implemented interfaces:
- public class PkCASetUp
- extends Object
- implements PkConstants
Field Summary
Modifier and Type | Field and Description |
---|---|
|
CA
|
|
CA_ALL
|
|
CERT
|
|
CRL
|
|
SERVER
|
Fields inherited from interface com.ibm.security.certclient.base.PkConstants |
---|
BIG_ONE, BIG_TWO, PKI_DB_CONN, PKI_DB_CONNS, PKI_ISSUER_DN, PKI_ISSUER_HOST, PKI_ISSUER_PORT, PKI_OPER, PKI_ROOT |
Fields inherited from interface com.ibm.security.certclient.base.PkAttrKind |
---|
ATTR_APPLIED, ATTR_APPROVED, ATTR_NAMES |
Fields inherited from interface com.ibm.security.certclient.base.PkRevoConstants |
---|
REVO_BAD_SINCE_DATE, REVO_CRL_EXT, REVO_OPER, REVO_PUBLISH_IMMEDIATELY, REVO_REASON, REVO_ROOT |
Fields inherited from interface com.ibm.security.certclient.base.PkHttpConstants |
---|
HTTP_BASE_NAME, HTTP_FILE_NAME, HTTP_METHOD, HTTP_ROOT, HTTP_VERSION |
Fields inherited from interface com.ibm.security.certclient.base.PkPollConstants |
---|
POLL_REFERENCE, POLL_ROOT, POLL_TIME_TO_CHECK_BACK |
Constructor Summary
Constructor and Description |
---|
PkCASetUp(String name,String keyType,String sigAlg,int keyBits,long validity,String keyUsageType)
Creates a key-pair and self-signed certificate object for a particular
key type and signature algorithm.
|
PkCASetUp(String name,String keyType,String sigAlg,int keyBits,long validity,String[] keyUsageType,String providerName)
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
computeKID(PublicKey key,boolean shortValue)
|
getCertificate()
|
|
getPrivateKey()
|
|
getSigAlg()
|
|
|
keyPairGenerate(String keyType,int keyBits,String providerName)
|
recertify(X509Certificate b,int certType,PrivateKey pKey,Date notBefore,Date notAfter,String providerName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
CERT
- public static final int CERT
See Also:
SERVER
- public static final int SERVER
See Also:
CRL
- public static final int CRL
See Also:
CA
- public static final int CA
See Also:
CA_ALL
- public static final int CA_ALL
See Also:
Constructor Detail
PkCASetUp
- public PkCASetUp(String name,
- String keyType,
- String sigAlg,
- int keyBits,
- long validity,
- String keyUsageType)
- throws GeneralSecurityException
- IOException
- PkException
Creates a key-pair and self-signed certificate object for a particular
key type and signature algorithm.
Parameters:
name
- the x500 name to use for the self-signed certificate keyType
- type of key, e.g. "RSA", "DSA" sigAlg
- name of the signature algorithm, e.g. "MD5WithRSA",
"MD2WithRSA", "SHAwithDSA" keyBits
- key size for generated key-pair validity
- certificate validity in seconds Throws:
PkCASetUp
- public PkCASetUp(String name,
- String keyType,
- String sigAlg,
- int keyBits,
- long validity,
- String[] keyUsageType,
- String providerName)
- throws GeneralSecurityException
- IOException
- PkException
Method Detail
getPrivateKey
- public PrivateKey getPrivateKey( )
getCertificate
- public X509Certificate getCertificate( )
getSigAlg
- public String getSigAlg()
computeKID
- public static byte[] computeKID( PublicKey key,
- boolean shortValue)
- throws NoSuchAlgorithmException
Throws:
recertify
- public X509Certificate recertify( X509Certificate b,
- int certType,
- PrivateKey pKey,
- Date notBefore,
- Date notAfter,
- String providerName)
- throws GeneralSecurityException
Throws:
keyPairGenerate
- public void keyPairGenerate(String keyType,
- int keyBits,
- String providerName)
- throws GeneralSecurityException
Throws: