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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
ADD_ALL_UIDS has 4 user-ids, where 2 are equal, just with different binding sigs.getName()
static void
void
void
void
void
void
void
void
void
void
void
Merging a certificate with itself does not change anything.void
void
void
void
void
void
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
-
Constructor Details
-
PGPPublicKeyMergeTest
public PGPPublicKeyMergeTest()
-
-
Method Details
-
main
-
getName
- Specified by:
getName
in interfaceorg.bouncycastle.util.test.Test
- Specified by:
getName
in classorg.bouncycastle.util.test.SimpleTest
-
performTest
- Specified by:
performTest
in classorg.bouncycastle.util.test.SimpleTest
- Throws:
Exception
-
cannotMergeDifferentCerts
- Throws:
IOException
PGPException
-
mergeBaseWithItselfDoesNotChangeCert
Merging a certificate with itself does not change anything.- Throws:
IOException
PGPException
-
duplicateUserIdIsMergedWhenReadingCert
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:
IOException
-
mergeAllUserIdsInOrderYieldsAllUserIds
- Throws:
IOException
PGPException
-
mergeAllUserIdsInReverseYieldsAllUserIds
- Throws:
IOException
PGPException
-
mergeAddUserId1WithBaseYieldsUserId1
- Throws:
IOException
PGPException
-
mergeAllSubkeysInOrderYieldsAllSubkeys
- Throws:
IOException
PGPException
-
mergeAllSubkeysInReverseYieldsAllSubkeys
- Throws:
IOException
PGPException
-
mergeAddSubkey1WithBaseYieldsSubkey1
- Throws:
IOException
PGPException
-
mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds
public void mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds() throws PGPException, IOException- Throws:
PGPException
IOException
-
mergeAllSubkeysAndUserIdsYieldsAllSubkeysUserIds
- Throws:
IOException
PGPException
-
mergeCert2SignsBaseWithBaseYieldsCert2SignsBase
- Throws:
IOException
PGPException
-
mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds
public void mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds() throws IOException, PGPException- Throws:
IOException
PGPException
-
mergeCert3SignsBaseWithBaseYieldsCert3SignsBase
- Throws:
IOException
PGPException
-
mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds
public void mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds() throws IOException, PGPException- Throws:
IOException
PGPException
-
mergeCert2SignsBaseWithCert3SignsBase
- Throws:
PGPException
IOException
-
mergeAllCert2AndCert3Certifications
- Throws:
IOException
PGPException
-