1
0
Fork 0
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:
Paul Schaub 2023-05-30 14:51:32 +02:00
parent 55058d6070
commit be5562d273
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 5 additions and 5 deletions

View file

@ -41,7 +41,7 @@ public enum Feature {
* @see <a href="https://openpgp-wg.gitlab.io/rfc4880bis/#name-aead-encrypted-data-packet-"> * @see <a href="https://openpgp-wg.gitlab.io/rfc4880bis/#name-aead-encrypted-data-packet-">
* AEAD Encrypted Data Packet</a> * 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. * If a key announces this feature, it is a version 5 public key.

View file

@ -140,7 +140,7 @@ public class SignatureSubpacketsUtilTest {
PGPSignatureGenerator generator = getSignatureGenerator(certKey, SignatureType.CASUAL_CERTIFICATION); PGPSignatureGenerator generator = getSignatureGenerator(certKey, SignatureType.CASUAL_CERTIFICATION);
PGPSignatureSubpacketGenerator hashed = new PGPSignatureSubpacketGenerator(); 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()); generator.setHashedSubpackets(hashed.generate());
PGPSignature signature = generator.generateCertification(secretKeys.getPublicKey()); PGPSignature signature = generator.generateCertification(secretKeys.getPublicKey());
@ -148,7 +148,7 @@ public class SignatureSubpacketsUtilTest {
assertNotNull(featureSet); assertNotNull(featureSet);
assertEquals(2, featureSet.size()); assertEquals(2, featureSet.size());
assertTrue(featureSet.contains(Feature.MODIFICATION_DETECTION)); 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)); assertFalse(featureSet.contains(Feature.GNUPG_VERSION_5_PUBLIC_KEY));
} }

View file

@ -388,7 +388,7 @@ public class SignatureSubpacketsTest {
@Test @Test
public void testSetFeatures() { 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); PGPSignatureSubpacketVector vector = SignatureSubpacketsHelper.toVector(wrapper);
Features features = vector.getFeatures(); Features features = vector.getFeatures();
@ -476,7 +476,7 @@ public class SignatureSubpacketsTest {
subpackets.setKeyFlags(true, KeyFlag.toBitmask(KeyFlag.SIGN_DATA, KeyFlag.CERTIFY_OTHER)); subpackets.setKeyFlags(true, KeyFlag.toBitmask(KeyFlag.SIGN_DATA, KeyFlag.CERTIFY_OTHER));
subpackets.addSignerUserID(false, "alice@test.test"); subpackets.addSignerUserID(false, "alice@test.test");
subpackets.setRevocationReason(true, RevocationAttributes.Reason.KEY_RETIRED.code(), "Key was retired."); 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]; byte[] hash = new byte[128];
new Random().nextBytes(hash); new Random().nextBytes(hash);
subpackets.setSignatureTarget(false, publicKeys.getPublicKey().getAlgorithm(), HashAlgorithm.SHA512.getAlgorithmId(), hash); subpackets.setSignatureTarget(false, publicKeys.getPublicKey().getAlgorithm(), HashAlgorithm.SHA512.getAlgorithmId(), hash);