Bouncy Castle Cryptography 1.71

org.bouncycastle.openpgp.test
Class PGPPublicKeyMergeTest

java.lang.Object
  |
  +--org.bouncycastle.util.test.SimpleTest
        |
        +--org.bouncycastle.openpgp.test.PGPPublicKeyMergeTest

public class PGPPublicKeyMergeTest
extends org.bouncycastle.util.test.SimpleTest

Test for certificate merging. Test vectors are taken with permission from Sequoia-PGP.

See Also:
Sequoia-PGP, Test Vectors

Constructor Summary
PGPPublicKeyMergeTest()
           
 
Method Summary
 void cannotMergeDifferentCerts()
           
 void duplicateUserIdIsMergedWhenReadingCert()
          ADD_ALL_UIDS has 4 user-ids, where 2 are equal, just with different binding sigs.
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void mergeAddSubkey1WithBaseYieldsSubkey1()
           
 void mergeAddUserId1WithBaseYieldsUserId1()
           
 void mergeAllCert2AndCert3Certifications()
           
 void mergeAllSubkeysAndUserIdsYieldsAllSubkeysUserIds()
           
 void mergeAllSubkeysInOrderYieldsAllSubkeys()
           
 void mergeAllSubkeysInReverseYieldsAllSubkeys()
           
 void mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds()
           
 void mergeAllUserIdsInOrderYieldsAllUserIds()
           
 void mergeAllUserIdsInReverseYieldsAllUserIds()
           
 void mergeBaseWithItselfDoesNotChangeCert()
          Merging a certificate with itself does not change anything.
 void mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds()
           
 void mergeCert2SignsBaseWithBaseYieldsCert2SignsBase()
           
 void mergeCert2SignsBaseWithCert3SignsBase()
           
 void mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds()
           
 void mergeCert3SignsBaseWithBaseYieldsCert3SignsBase()
           
 void performTest()
           
 
Methods inherited from class org.bouncycastle.util.test.SimpleTest
areEqual, areEqual, areEqual, fail, fail, fail, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isTrue, isTrue, perform, runTest, runTest, runTests, runTests
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PGPPublicKeyMergeTest

public PGPPublicKeyMergeTest()
Method Detail

main

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

getName

public java.lang.String getName()
Overrides:
getName in class org.bouncycastle.util.test.SimpleTest

performTest

public void performTest()
                 throws java.lang.Exception
Overrides:
performTest in class org.bouncycastle.util.test.SimpleTest

cannotMergeDifferentCerts

public void cannotMergeDifferentCerts()
                               throws java.io.IOException,
                                      PGPException

mergeBaseWithItselfDoesNotChangeCert

public void mergeBaseWithItselfDoesNotChangeCert()
                                          throws java.io.IOException,
                                                 PGPException
Merging a certificate with itself does not change anything.
Throws:
java.io.IOException -  
PGPException -  

duplicateUserIdIsMergedWhenReadingCert

public void duplicateUserIdIsMergedWhenReadingCert()
                                            throws java.io.IOException
ADD_ALL_UIDS has 4 user-ids, where 2 are equal, just with different binding sigs. Those are expected to be merged together by BC.
Throws:
java.io.IOException -  

mergeAllUserIdsInOrderYieldsAllUserIds

public void mergeAllUserIdsInOrderYieldsAllUserIds()
                                            throws java.io.IOException,
                                                   PGPException

mergeAllUserIdsInReverseYieldsAllUserIds

public void mergeAllUserIdsInReverseYieldsAllUserIds()
                                              throws java.io.IOException,
                                                     PGPException

mergeAddUserId1WithBaseYieldsUserId1

public void mergeAddUserId1WithBaseYieldsUserId1()
                                          throws java.io.IOException,
                                                 PGPException

mergeAllSubkeysInOrderYieldsAllSubkeys

public void mergeAllSubkeysInOrderYieldsAllSubkeys()
                                            throws java.io.IOException,
                                                   PGPException

mergeAllSubkeysInReverseYieldsAllSubkeys

public void mergeAllSubkeysInReverseYieldsAllSubkeys()
                                              throws java.io.IOException,
                                                     PGPException

mergeAddSubkey1WithBaseYieldsSubkey1

public void mergeAddSubkey1WithBaseYieldsSubkey1()
                                          throws java.io.IOException,
                                                 PGPException

mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds

public void mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds()
                                                             throws PGPException,
                                                                    java.io.IOException

mergeAllSubkeysAndUserIdsYieldsAllSubkeysUserIds

public void mergeAllSubkeysAndUserIdsYieldsAllSubkeysUserIds()
                                                      throws java.io.IOException,
                                                             PGPException

mergeCert2SignsBaseWithBaseYieldsCert2SignsBase

public void mergeCert2SignsBaseWithBaseYieldsCert2SignsBase()
                                                     throws java.io.IOException,
                                                            PGPException

mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds

public void mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds()
                                                                 throws java.io.IOException,
                                                                        PGPException

mergeCert3SignsBaseWithBaseYieldsCert3SignsBase

public void mergeCert3SignsBaseWithBaseYieldsCert3SignsBase()
                                                     throws java.io.IOException,
                                                            PGPException

mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds

public void mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds()
                                                                 throws java.io.IOException,
                                                                        PGPException

mergeCert2SignsBaseWithCert3SignsBase

public void mergeCert2SignsBaseWithCert3SignsBase()
                                           throws PGPException,
                                                  java.io.IOException

mergeAllCert2AndCert3Certifications

public void mergeAllCert2AndCert3Certifications()
                                         throws java.io.IOException,
                                                PGPException

Bouncy Castle Cryptography 1.71