|
Bouncy Castle Cryptography 1.26 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.jce.examples.PKCS12Example
Example of how to set up a certificiate chain and a PKCS 12 store for a private individual - obviously you'll need to generate your own keys, and you may need to modify the NetscapeCertType extension or add a key usage extension depending on your application, but you should get the idea! As always this is just an example...
Constructor Summary | |
PKCS12Example()
|
Method Summary | |
static AuthorityKeyIdentifier |
createAuthorityKeyId(java.security.PublicKey pubKey)
|
static AuthorityKeyIdentifier |
createAuthorityKeyId(java.security.PublicKey pubKey,
X509Name name,
int sNumber)
|
static java.security.cert.Certificate |
createCert(java.security.PublicKey pubKey,
java.security.PrivateKey caPrivKey,
java.security.PublicKey caPubKey)
we generate a certificate signed by our CA's intermediate certficate |
static java.security.cert.Certificate |
createIntermediateCert(java.security.PublicKey pubKey,
java.security.PrivateKey caPrivKey,
java.security.PublicKey caPubKey)
we generate an intermediate certificate signed by our CA |
static java.security.cert.Certificate |
createMasterCert(java.security.PublicKey pubKey,
java.security.PrivateKey privKey)
we generate the CA's certificate |
static SubjectKeyIdentifier |
createSubjectKeyId(java.security.PublicKey pubKey)
|
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PKCS12Example()
Method Detail |
public static SubjectKeyIdentifier createSubjectKeyId(java.security.PublicKey pubKey)
public static AuthorityKeyIdentifier createAuthorityKeyId(java.security.PublicKey pubKey, X509Name name, int sNumber)
public static AuthorityKeyIdentifier createAuthorityKeyId(java.security.PublicKey pubKey)
public static java.security.cert.Certificate createMasterCert(java.security.PublicKey pubKey, java.security.PrivateKey privKey) throws java.lang.Exception
java.lang.Exception
public static java.security.cert.Certificate createIntermediateCert(java.security.PublicKey pubKey, java.security.PrivateKey caPrivKey, java.security.PublicKey caPubKey) throws java.lang.Exception
java.lang.Exception
public static java.security.cert.Certificate createCert(java.security.PublicKey pubKey, java.security.PrivateKey caPrivKey, java.security.PublicKey caPubKey) throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
Bouncy Castle Cryptography 1.26 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |