PfxPduTest (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.pkcs.test

## Class PfxPduTest

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - org.bouncycastle.pkcs.test.PfxPduTest

- All Implemented Interfaces:
    junit.framework.Test

      public class PfxPduTest
      extends junit.framework.TestCase

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PfxPduTest()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.security.cert.X509Certificate` | `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.X509Certificate` | `createIntermediateCert(java.security.PublicKey pubKey, java.security.PrivateKey caPrivKey, java.security.cert.X509Certificate caCert)` we generate an intermediate certificate signed by our CA
    `static java.security.cert.X509Certificate` | `createMasterCert(java.security.PublicKey pubKey, java.security.PrivateKey privKey)` we generate the CA's certificate
    `void` | `setUp()`
    `void` | `testBasicPKCS12()`
    `void` | `testBcEncryptedPrivateKeyInfo()`
    `void` | `testCreateAES256andSHA256()`
    `void` | `testEncryptedPrivateKeyInfo()`
    `void` | `testEncryptedPrivateKeyInfoPKCS5()`
    `void` | `testExceptions()`
    `void` | `testGOST1()`
    `void` | `testGOST2()`
    `void` | `testKeyBag()`
    `void` | `testPfxPdu()`
    `void` | `testPfxPduMac()`
    `void` | `testPKCS5()`
    `void` | `testSafeBagRecovery()`
    `void` | `testSHA256withPKCS5()`

    - ### Methods inherited from class junit.framework.TestCase

      `countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString`

    - ### Methods inherited from class junit.framework.Assert

      `assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PfxPduTest

          public PfxPduTest()

  - ### Method Detail

    - #### createMasterCert

          public static java.security.cert.X509Certificate createMasterCert(java.security.PublicKey pubKey,
                                                            java.security.PrivateKey privKey)
                                                                     throws java.lang.Exception

      we generate the CA's certificate
      Throws:
        `java.lang.Exception`

    - #### createIntermediateCert

          public static java.security.cert.X509Certificate createIntermediateCert(java.security.PublicKey pubKey,
                                                                  java.security.PrivateKey caPrivKey,
                                                                  java.security.cert.X509Certificate caCert)
                                                                           throws java.lang.Exception

      we generate an intermediate certificate signed by our CA
      Throws:
        `java.lang.Exception`

    - #### createCert

          public static java.security.cert.X509Certificate createCert(java.security.PublicKey pubKey,
                                                      java.security.PrivateKey caPrivKey,
                                                      java.security.PublicKey caPubKey)
                                                               throws java.lang.Exception

      we generate a certificate signed by our CA's intermediate certficate
      Throws:
        `java.lang.Exception`

    - #### setUp

          public void setUp()

      Overrides:
        `setUp` in class `junit.framework.TestCase`

    - #### testPfxPdu

          public void testPfxPdu()
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testPfxPduMac

          public void testPfxPduMac()
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testBcEncryptedPrivateKeyInfo

          public void testBcEncryptedPrivateKeyInfo()
                                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testEncryptedPrivateKeyInfo

          public void testEncryptedPrivateKeyInfo()
                                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testEncryptedPrivateKeyInfoPKCS5

          public void testEncryptedPrivateKeyInfoPKCS5()
                                                throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testKeyBag

          public void testKeyBag()
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testSafeBagRecovery

          public void testSafeBagRecovery()
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testExceptions

          public void testExceptions()
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testBasicPKCS12

          public void testBasicPKCS12()
                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testSHA256withPKCS5

          public void testSHA256withPKCS5()
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testCreateAES256andSHA256

          public void testCreateAES256andSHA256()
                                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testPKCS5

          public void testPKCS5()
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testGOST1

          public void testGOST1()
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testGOST2

          public void testGOST2()
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`