org.bouncycastle.jce.provider.test
Class TestUtils

java.lang.Object
  extended by org.bouncycastle.jce.provider.test.TestUtils

 class TestUtils
extends java.lang.Object

Test Utils


Nested Class Summary
private static class TestUtils.ExceptionCertificate
           
 
Constructor Summary
TestUtils()
           
 
Method Summary
static java.security.cert.X509CRL createCRL(java.security.cert.X509Certificate caCert, java.security.PrivateKey caKey, java.math.BigInteger serialNumber)
           
static java.security.cert.X509Certificate createExceptionCertificate(boolean exceptionOnEncode)
           
static java.security.cert.X509Certificate generateEndEntityCert(java.security.PublicKey entityKey, java.security.PrivateKey caKey, java.security.cert.X509Certificate caCert)
           
static java.security.cert.X509Certificate generateIntermediateCert(java.security.PublicKey intKey, java.security.PrivateKey caKey, java.security.cert.X509Certificate caCert)
           
static java.security.cert.X509Certificate generateRootCert(java.security.KeyPair pair)
           
static java.security.KeyPair generateRSAKeyPair()
          Create a random 1024 bit RSA key pair
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestUtils

TestUtils()
Method Detail

generateRSAKeyPair

public static java.security.KeyPair generateRSAKeyPair()
                                                throws java.lang.Exception
Create a random 1024 bit RSA key pair

Throws:
java.lang.Exception

generateRootCert

public static java.security.cert.X509Certificate generateRootCert(java.security.KeyPair pair)
                                                           throws java.lang.Exception
Throws:
java.lang.Exception

generateIntermediateCert

public static java.security.cert.X509Certificate generateIntermediateCert(java.security.PublicKey intKey,
                                                                          java.security.PrivateKey caKey,
                                                                          java.security.cert.X509Certificate caCert)
                                                                   throws java.lang.Exception
Throws:
java.lang.Exception

generateEndEntityCert

public static java.security.cert.X509Certificate generateEndEntityCert(java.security.PublicKey entityKey,
                                                                       java.security.PrivateKey caKey,
                                                                       java.security.cert.X509Certificate caCert)
                                                                throws java.lang.Exception
Throws:
java.lang.Exception

createCRL

public static java.security.cert.X509CRL createCRL(java.security.cert.X509Certificate caCert,
                                                   java.security.PrivateKey caKey,
                                                   java.math.BigInteger serialNumber)
                                            throws java.lang.Exception
Throws:
java.lang.Exception

createExceptionCertificate

public static java.security.cert.X509Certificate createExceptionCertificate(boolean exceptionOnEncode)