mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-25 22:02:05 +01:00
Fix typo in feature name
This commit is contained in:
parent
55058d6070
commit
be5562d273
3 changed files with 5 additions and 5 deletions
|
@ -41,7 +41,7 @@ public enum Feature {
|
|||
* @see <a href="https://openpgp-wg.gitlab.io/rfc4880bis/#name-aead-encrypted-data-packet-">
|
||||
* AEAD Encrypted Data Packet</a>
|
||||
*/
|
||||
GNUGP_AEAD_ENCRYPTED_DATA(Features.FEATURE_AEAD_ENCRYPTED_DATA),
|
||||
GNUPG_AEAD_ENCRYPTED_DATA(Features.FEATURE_AEAD_ENCRYPTED_DATA),
|
||||
|
||||
/**
|
||||
* If a key announces this feature, it is a version 5 public key.
|
||||
|
|
|
@ -140,7 +140,7 @@ public class SignatureSubpacketsUtilTest {
|
|||
|
||||
PGPSignatureGenerator generator = getSignatureGenerator(certKey, SignatureType.CASUAL_CERTIFICATION);
|
||||
PGPSignatureSubpacketGenerator hashed = new PGPSignatureSubpacketGenerator();
|
||||
hashed.setFeature(true, Feature.toBitmask(Feature.MODIFICATION_DETECTION, Feature.GNUGP_AEAD_ENCRYPTED_DATA));
|
||||
hashed.setFeature(true, Feature.toBitmask(Feature.MODIFICATION_DETECTION, Feature.GNUPG_AEAD_ENCRYPTED_DATA));
|
||||
generator.setHashedSubpackets(hashed.generate());
|
||||
|
||||
PGPSignature signature = generator.generateCertification(secretKeys.getPublicKey());
|
||||
|
@ -148,7 +148,7 @@ public class SignatureSubpacketsUtilTest {
|
|||
assertNotNull(featureSet);
|
||||
assertEquals(2, featureSet.size());
|
||||
assertTrue(featureSet.contains(Feature.MODIFICATION_DETECTION));
|
||||
assertTrue(featureSet.contains(Feature.GNUGP_AEAD_ENCRYPTED_DATA));
|
||||
assertTrue(featureSet.contains(Feature.GNUPG_AEAD_ENCRYPTED_DATA));
|
||||
assertFalse(featureSet.contains(Feature.GNUPG_VERSION_5_PUBLIC_KEY));
|
||||
}
|
||||
|
||||
|
|
|
@ -388,7 +388,7 @@ public class SignatureSubpacketsTest {
|
|||
|
||||
@Test
|
||||
public void testSetFeatures() {
|
||||
wrapper.setFeatures(Feature.MODIFICATION_DETECTION, Feature.GNUGP_AEAD_ENCRYPTED_DATA);
|
||||
wrapper.setFeatures(Feature.MODIFICATION_DETECTION, Feature.GNUPG_AEAD_ENCRYPTED_DATA);
|
||||
PGPSignatureSubpacketVector vector = SignatureSubpacketsHelper.toVector(wrapper);
|
||||
|
||||
Features features = vector.getFeatures();
|
||||
|
@ -476,7 +476,7 @@ public class SignatureSubpacketsTest {
|
|||
subpackets.setKeyFlags(true, KeyFlag.toBitmask(KeyFlag.SIGN_DATA, KeyFlag.CERTIFY_OTHER));
|
||||
subpackets.addSignerUserID(false, "alice@test.test");
|
||||
subpackets.setRevocationReason(true, RevocationAttributes.Reason.KEY_RETIRED.code(), "Key was retired.");
|
||||
subpackets.setFeature(true, Feature.toBitmask(Feature.MODIFICATION_DETECTION, Feature.GNUGP_AEAD_ENCRYPTED_DATA));
|
||||
subpackets.setFeature(true, Feature.toBitmask(Feature.MODIFICATION_DETECTION, Feature.GNUPG_AEAD_ENCRYPTED_DATA));
|
||||
byte[] hash = new byte[128];
|
||||
new Random().nextBytes(hash);
|
||||
subpackets.setSignatureTarget(false, publicKeys.getPublicKey().getAlgorithm(), HashAlgorithm.SHA512.getAlgorithmId(), hash);
|
||||
|
|
Loading…
Reference in a new issue