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 TypeMethodDescriptionvoidvoidADD_ALL_UIDS has 4 user-ids, where 2 are equal, just with different binding sigs.getName()static voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidMerging a certificate with itself does not change anything.voidvoidvoidvoidvoidvoidMethods 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:
getNamein interfaceorg.bouncycastle.util.test.Test- Specified by:
getNamein classorg.bouncycastle.util.test.SimpleTest
-
performTest
- Specified by:
performTestin classorg.bouncycastle.util.test.SimpleTest- Throws:
Exception
-
cannotMergeDifferentCerts
- Throws:
IOExceptionPGPException
-
mergeBaseWithItselfDoesNotChangeCert
Merging a certificate with itself does not change anything.- Throws:
IOExceptionPGPException
-
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:
IOExceptionPGPException
-
mergeAllUserIdsInReverseYieldsAllUserIds
- Throws:
IOExceptionPGPException
-
mergeAddUserId1WithBaseYieldsUserId1
- Throws:
IOExceptionPGPException
-
mergeAllSubkeysInOrderYieldsAllSubkeys
- Throws:
IOExceptionPGPException
-
mergeAllSubkeysInReverseYieldsAllSubkeys
- Throws:
IOExceptionPGPException
-
mergeAddSubkey1WithBaseYieldsSubkey1
- Throws:
IOExceptionPGPException
-
mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds
public void mergeAllSubkeysWithAllUserIdsYieldsAllSubkeysAndUserIds() throws PGPException, IOException- Throws:
PGPExceptionIOException
-
mergeAllSubkeysAndUserIdsYieldsAllSubkeysUserIds
- Throws:
IOExceptionPGPException
-
mergeCert2SignsBaseWithBaseYieldsCert2SignsBase
- Throws:
IOExceptionPGPException
-
mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds
public void mergeCert2SignsAllUserIdsWithBaseYieldsCert2SignsAllUserIds() throws IOException, PGPException- Throws:
IOExceptionPGPException
-
mergeCert3SignsBaseWithBaseYieldsCert3SignsBase
- Throws:
IOExceptionPGPException
-
mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds
public void mergeCert3SignsAllUserIdsWithBaseYieldsCert3SignsAllUserIds() throws IOException, PGPException- Throws:
IOExceptionPGPException
-
mergeCert2SignsBaseWithCert3SignsBase
- Throws:
PGPExceptionIOException
-
mergeAllCert2AndCert3Certifications
- Throws:
IOExceptionPGPException
-