mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-25 22:02:05 +01:00
Fix User-ID format in documentation and note invalid user-id formats in tests
This commit is contained in:
parent
56abb51757
commit
223cf009fc
3 changed files with 6 additions and 4 deletions
|
@ -8,11 +8,10 @@ However, it is agreed upon to use the
|
||||||
Below is a selection of possible User-IDs:
|
Below is a selection of possible User-IDs:
|
||||||
|
|
||||||
```
|
```
|
||||||
Firstname Lastname <email@address.tld> [Comment]
|
Firstname Lastname (Comment) <email@address.tld>
|
||||||
Firstname Lastname
|
Firstname Lastname
|
||||||
Firstname Lastname [Comment]
|
Firstname Lastname (Comment)
|
||||||
<email@address.tld>
|
<email@address.tld>
|
||||||
<email@address.tld> [Comment]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
PGPainless comes with a builder class `UserId`, which can be used to safely construct User-IDs:
|
PGPainless comes with a builder class `UserId`, which can be used to safely construct User-IDs:
|
||||||
|
@ -29,5 +28,5 @@ UserId full = UserId.newBuilder()
|
||||||
.withEmail("peter@pgpainless.org")
|
.withEmail("peter@pgpainless.org")
|
||||||
.withComment("Work Address")
|
.withComment("Work Address")
|
||||||
.build();
|
.build();
|
||||||
assertEquals("Peter Pattern <peter@pgpainless.org> [Work Address]", full.toString());
|
assertEquals("Peter Pattern (Work Address) <peter@pgpainless.org>", full.toString());
|
||||||
```
|
```
|
|
@ -704,6 +704,8 @@ public class KeyRingInfoTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getEmailsTest() throws IOException {
|
public void getEmailsTest() throws IOException {
|
||||||
|
// NOTE: The User-ID Format for the ID "Alice Anderson <alice@email.tld> [Primary Mail Address]" is incorrect.
|
||||||
|
// TODO: Fix?
|
||||||
String KEY = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" +
|
String KEY = "-----BEGIN PGP PRIVATE KEY BLOCK-----\n" +
|
||||||
"Version: PGPainless\n" +
|
"Version: PGPainless\n" +
|
||||||
"Comment: B4A8 9FE8 9D59 31E6 BCF7 DC2F 6BA1 2CC7 9A08 8D73\n" +
|
"Comment: B4A8 9FE8 9D59 31E6 BCF7 DC2F 6BA1 2CC7 9A08 8D73\n" +
|
||||||
|
|
|
@ -119,6 +119,7 @@ public class SignatureUtilsTest {
|
||||||
"-----END PGP PUBLIC KEY BLOCK-----\n";
|
"-----END PGP PUBLIC KEY BLOCK-----\n";
|
||||||
|
|
||||||
String aliceId = "Alice <alice@exmaple.com>";
|
String aliceId = "Alice <alice@exmaple.com>";
|
||||||
|
// TODO: Fix wrong user-id format of pet name
|
||||||
String charliesPetNameForAlice = "Alice Example <alice@example.com> [from work]";
|
String charliesPetNameForAlice = "Alice Example <alice@example.com> [from work]";
|
||||||
|
|
||||||
long aliceKeyId = 1059762964264170602L;
|
long aliceKeyId = 1059762964264170602L;
|
||||||
|
|
Loading…
Reference in a new issue