Package org.bouncycastle.openpgp.test
Class PGPPublicKeyMergeTest
- java.lang.Object
-
- org.bouncycastle.util.test.SimpleTest
-
- org.bouncycastle.openpgp.test.PGPPublicKeyMergeTest
-
- All Implemented Interfaces:
org.bouncycastle.util.test.Test
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
Constructors Constructor Description PGPPublicKeyMergeTest()
-
Method Summary
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceorg.bouncycastle.util.test.Test
- Specified by:
getName
in classorg.bouncycastle.util.test.SimpleTest
-
performTest
public void performTest() throws java.lang.Exception
- Specified by:
performTest
in classorg.bouncycastle.util.test.SimpleTest
- Throws:
java.lang.Exception
-
cannotMergeDifferentCerts
public void cannotMergeDifferentCerts() throws java.io.IOException, PGPException
- 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
- Throws:
java.io.IOException
PGPException
-
mergeAllUserIdsInReverseYieldsAllUserIds
public void mergeAllUserIdsInReverseYieldsAllUserIds() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeAddUserId1WithBaseYieldsUserId1
public void mergeAddUserId1WithBaseYieldsUserId1() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeAllSubkeysInOrderYieldsAllSubkeys
public void mergeAllSubkeysInOrderYieldsAllSubkeys() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeAllSubkeysInReverseYieldsAllSubkeys
public void mergeAllSubkeysInReverseYieldsAllSubkeys() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeAddSubkey1WithBaseYieldsSubkey1
public void mergeAddSubkey1WithBaseYieldsSubkey1() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds
public void mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds() throws PGPException, java.io.IOException
- Throws:
PGPException
java.io.IOException
-
mergeAllSubkeysAndUserIdsYieldsAllSubkeysUserIds
public void mergeAllSubkeysAndUserIdsYieldsAllSubkeysUserIds() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeCert2SignsBaseWithBaseYieldsCert2SignsBase
public void mergeCert2SignsBaseWithBaseYieldsCert2SignsBase() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds
public void mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeCert3SignsBaseWithBaseYieldsCert3SignsBase
public void mergeCert3SignsBaseWithBaseYieldsCert3SignsBase() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds
public void mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
mergeCert2SignsBaseWithCert3SignsBase
public void mergeCert2SignsBaseWithCert3SignsBase() throws PGPException, java.io.IOException
- Throws:
PGPException
java.io.IOException
-
mergeAllCert2AndCert3Certifications
public void mergeAllCert2AndCert3Certifications() throws java.io.IOException, PGPException
- Throws:
java.io.IOException
PGPException
-
-