|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.cert.CertificateUtil
public abstract class CertificateUtil
Created: Sep 22, 2010 3:09:01 PM
| Field Summary | |
|---|---|
protected static byte[] |
ID_ON_XMPPADDR
|
| Constructor Summary | |
|---|---|
CertificateUtil()
|
|
| Method Summary | |
|---|---|
static KeyPair |
createKeyPair(int size,
String password)
Method description |
static X509Certificate |
createSelfSignedCertificate(String email,
String domain,
String organizationUnit,
String organization,
String city,
String state,
String country,
KeyPair keyPair)
Method description |
static String |
exportToPemFormat(CertificateEntry entry)
Method description |
static List<String> |
extractXmppAddrs(X509Certificate x509Certificate)
|
static String |
getCertCName(X509Certificate cert)
Method description |
static boolean |
isExpired(X509Certificate cert)
Method description |
static boolean |
isSelfSigned(X509Certificate cert)
Method description |
static CertificateEntry |
loadCertificate(File file)
Method description |
static CertificateEntry |
loadCertificate(String file)
Method description |
static PrivateKey |
loadPrivateKeyFromDER(File file)
Method description |
static void |
main(String[] args)
Method description |
static CertificateEntry |
parseCertificate(Reader data)
Method description |
static void |
storeCertificate(String file,
CertificateEntry entry)
Method description |
static CertCheckResult |
validateCertificate(Certificate[] chain,
KeyStore trustKeystore,
boolean revocationEnabled)
Method description |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final byte[] ID_ON_XMPPADDR
| Constructor Detail |
|---|
public CertificateUtil()
| Method Detail |
|---|
public static KeyPair createKeyPair(int size,
String password)
throws NoSuchAlgorithmException
size - password -
NoSuchAlgorithmException
public static X509Certificate createSelfSignedCertificate(String email,
String domain,
String organizationUnit,
String organization,
String city,
String state,
String country,
KeyPair keyPair)
throws CertificateException,
IOException,
NoSuchAlgorithmException,
InvalidKeyException,
NoSuchProviderException,
SignatureException
email - domain - organizationUnit - organization - city - state - country - keyPair -
CertificateException
IOException
NoSuchAlgorithmException
InvalidKeyException
NoSuchProviderException
SignatureException
public static String exportToPemFormat(CertificateEntry entry)
throws CertificateEncodingException
entry -
CertificateEncodingExceptionpublic static List<String> extractXmppAddrs(X509Certificate x509Certificate)
public static String getCertCName(X509Certificate cert)
cert -
public static boolean isExpired(X509Certificate cert)
cert -
public static boolean isSelfSigned(X509Certificate cert)
cert -
public static CertificateEntry loadCertificate(File file)
throws FileNotFoundException,
IOException,
CertificateException,
NoSuchAlgorithmException,
InvalidKeySpecException
file -
CertificateException
FileNotFoundException
IOException
InvalidKeySpecException
NoSuchAlgorithmException
public static CertificateEntry loadCertificate(String file)
throws FileNotFoundException,
IOException,
CertificateException,
NoSuchAlgorithmException,
InvalidKeySpecException
file -
CertificateException
FileNotFoundException
IOException
InvalidKeySpecException
NoSuchAlgorithmException
public static PrivateKey loadPrivateKeyFromDER(File file)
throws FileNotFoundException,
IOException,
NoSuchAlgorithmException,
InvalidKeySpecException
file -
FileNotFoundException
IOException
InvalidKeySpecException
NoSuchAlgorithmException
public static void main(String[] args)
throws Exception
args -
Exception
public static CertificateEntry parseCertificate(Reader data)
throws IOException,
CertificateException,
NoSuchAlgorithmException,
InvalidKeySpecException
data -
CertificateException
IOException
InvalidKeySpecException
NoSuchAlgorithmException
public static void storeCertificate(String file,
CertificateEntry entry)
throws CertificateEncodingException,
IOException
file - entry -
CertificateEncodingException
IOException
public static CertCheckResult validateCertificate(Certificate[] chain,
KeyStore trustKeystore,
boolean revocationEnabled)
throws NoSuchAlgorithmException,
KeyStoreException,
InvalidAlgorithmParameterException,
CertificateException
chain - revocationEnabled - trustKeystore -
CertificateException
NoSuchAlgorithmException
KeyStoreException
InvalidAlgorithmParameterException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||