public class CaHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
GLOBUS_ALGORITHM_HACK
If true, changes the default algorithm to MD5WITHRSA
|
static boolean |
GLOBUS_COG_HACK
If true, enables a hack which works around GT 4.2.1 "Bug 3299:12 Extended Key Usage certificate extension not supported"
(a
problem in CoG)
|
static org.bouncycastle.asn1.DERObjectIdentifier |
netscapeCertType |
| Constructor and Description |
|---|
CaHelper() |
| Modifier and Type | Method and Description |
|---|---|
static X509Certificate |
generateCaCertificate(String friendlyName,
KeyPair kp,
BigInteger serial,
org.bouncycastle.asn1.x509.X509Name issuer) |
static X509Certificate |
generateCaCertificate(String friendlyName,
KeyPair kp,
BigInteger serial,
org.bouncycastle.asn1.x509.X509Name issuer,
org.bouncycastle.asn1.x509.X509Name subject) |
static org.bouncycastle.jce.PKCS10CertificationRequest |
generateCertificateRequest(X509Certificate cert,
PrivateKey signingKey) |
static X509Certificate |
generateClientCertificate(PublicKey certificatePublicKey,
PrivateKey caPrivateKey,
org.bouncycastle.asn1.x509.X509Name issuer,
org.bouncycastle.asn1.x509.X509Name subject) |
static KeyPair |
generateKeyPair(int bits) |
static X509Certificate |
generateServerCertificate(PublicKey certificatePublicKey,
PrivateKey caPrivateKey,
org.bouncycastle.asn1.x509.X509Name issuer,
org.bouncycastle.asn1.x509.X509Name subject) |
static void |
main(String[] args) |
static String |
openssl_X509_NAME_hash(X500Principal p)
Generates a hexidecimal OpenSSL X509_NAME hash (as used in openssl x509 -hash -in cert.pem)
Based on openssl's crypto/x509/x509_cmp.c line 321 |
static String |
opensslHash(X509Certificate cert) |
public static final boolean GLOBUS_COG_HACK
public static final boolean GLOBUS_ALGORITHM_HACK
public static final org.bouncycastle.asn1.DERObjectIdentifier netscapeCertType
public static String opensslHash(X509Certificate cert)
public static String openssl_X509_NAME_hash(X500Principal p) throws NoSuchAlgorithmException
p - NoSuchAlgorithmExceptionpublic static X509Certificate generateClientCertificate(PublicKey certificatePublicKey, PrivateKey caPrivateKey, org.bouncycastle.asn1.x509.X509Name issuer, org.bouncycastle.asn1.x509.X509Name subject) throws Exception
certificatePublicKey - caPrivateKey - issuer - subject - Exceptionpublic static X509Certificate generateServerCertificate(PublicKey certificatePublicKey, PrivateKey caPrivateKey, org.bouncycastle.asn1.x509.X509Name issuer, org.bouncycastle.asn1.x509.X509Name subject) throws Exception
certificatePublicKey - caPrivateKey - issuer - subject - Exceptionpublic static X509Certificate generateCaCertificate(String friendlyName, KeyPair kp, BigInteger serial, org.bouncycastle.asn1.x509.X509Name issuer) throws Exception
Exceptionpublic static X509Certificate generateCaCertificate(String friendlyName, KeyPair kp, BigInteger serial, org.bouncycastle.asn1.x509.X509Name issuer, org.bouncycastle.asn1.x509.X509Name subject) throws Exception
kp - issuer - subject - Exceptionpublic static org.bouncycastle.jce.PKCS10CertificationRequest generateCertificateRequest(X509Certificate cert, PrivateKey signingKey) throws Exception
ExceptionCopyright © 2014. All rights reserved.