org.bouncycastle.jce.provider.test
Class PKCS12StoreTest

java.lang.Object
  extended by org.bouncycastle.util.test.SimpleTest
      extended by org.bouncycastle.jce.provider.test.PKCS12StoreTest
All Implemented Interfaces:
Test

public class PKCS12StoreTest
extends SimpleTest

Exercise the various key stores, making sure we at least get back what we put in!

This tests both the PKCS12 key store.


Field Summary
(package private)  byte[] certUTF
           
(package private) static char[] noFriendlyPassword
           
(package private) static char[] passwd
           
(package private)  byte[] pkcs12
           
(package private)  byte[] pkcs12noFriendly
           
(package private)  byte[] pkcs12nopass
           
(package private)  byte[] pkcs12StorageIssue
           
(package private) static char[] storagePassword
           
 
Constructor Summary
PKCS12StoreTest()
           
 
Method Summary
 java.security.cert.Certificate createCert(java.security.PublicKey pubKey, java.security.PrivateKey privKey)
          we generate a self signed certificate for the sake of testing - RSA
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
 void testPKCS12Store()
           
 
Methods inherited from class org.bouncycastle.util.test.SimpleTest
areEqual, fail, fail, fail, perform, runTest, runTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

passwd

static char[] passwd

pkcs12

byte[] pkcs12

certUTF

byte[] certUTF

pkcs12noFriendly

byte[] pkcs12noFriendly

noFriendlyPassword

static char[] noFriendlyPassword

pkcs12StorageIssue

byte[] pkcs12StorageIssue

storagePassword

static char[] storagePassword

pkcs12nopass

byte[] pkcs12nopass
Constructor Detail

PKCS12StoreTest

public PKCS12StoreTest()
Method Detail

createCert

public java.security.cert.Certificate createCert(java.security.PublicKey pubKey,
                                                 java.security.PrivateKey privKey)
                                          throws java.lang.Exception
we generate a self signed certificate for the sake of testing - RSA

Throws:
java.lang.Exception

testPKCS12Store

public void testPKCS12Store()
                     throws java.lang.Exception
Throws:
java.lang.Exception

getName

public java.lang.String getName()
Specified by:
getName in interface Test
Specified by:
getName in class SimpleTest

performTest

public void performTest()
                 throws java.lang.Exception
Specified by:
performTest in class SimpleTest
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)