Exporting public keys from PGPSecretKeyRing does denote sub keys as normal keys #381
Inspecting the encoded PGPPublicKeyRing with
I created this minimal example for you to recreate the issue.
The text was updated successfully, but these errors were encountered:
From the issue: My issue is the following: If I create a PGPSecretKeyRing containing a master key and a sub key, and then try to extract a PGPPublicKeyRing from it, the resulting key ring does only contain one key, as the sub keys are ignored. The cause for this is, that the sub keys are not carrying a PUBLIC_SUBKEY packet tag, but instead a PUBLIC_KEY tag. When creating the PGPPublicKeyRing, the sub keys are therefore ignored due to this line. Inspecting the encoded PGPPublicKeyRing with gpg --list-packets also suggests, that only two normal public keys are exported.  bcgit/bc-java#381