The example in the comments suggests that some of the keywords allow duplicates
https://github.com/gpg/gnupg/blob/gnupg-2.2.8/sm/certreqgen.c#L37
Same goes for the keyword declarations
https://github.com/gpg/gnupg/blob/gnupg-2.2.8/sm/certreqgen.c#L236
Yet I am getting a duplicate keyword error
https://github.com/gpg/gnupg/blob/gnupg-2.2.8/sm/certreqgen.c#L354
I personally couldn't spot the bug yet - but it's easy to replicate.
cat >master <<EOF Key-Type: RSA Key-Length: 4096 Name-Real: Some One Name-Email: foo@bla.com Name-Email: foo@blub.com Expire-Date: 0 %commit EOF gpg \ --no-default-keyring \ --secret-keyring ./test.sec \ --keyring ./test.pub \ --batch --gen-key master
Gives a gpg: master:5: duplicate keyword error.
Next I tried the example from the comments. But that gave me gpg: master:5: unknown keyword error.
Given that those keywords are all declared in the source code I am a little confused.
I fear I am not looking at the right code (while I should).
Either way - this seems to be implemented since some time in the 2.x tree. Therefore should be a regression.