Cannot list all the packets tags within a PGP signature.
I am stuck on a problem that seems pretty strange. I probably misused the Bouncy Castle API, but I cannot find what's wrong. I just try to list all the packets' tags within a PGP document (which is a PGP signature).
Here is the procedure:
I sign a document using the Bouncy Castle API. I generate a file that contains the PGP signature.
I use GPG to verify the signature. According to GPG, the signature is valid.
I use GPG to print the structure of the signature. It contains 3 packets which tags are: 4, 11 and 2.
Then I use the Bouncy Castle API to list the tags of the packets that composed the signature. I get: 4 and 11. However, the next tag found is 20 (???), and I get an exception telling me "java.io.IOException: invalid header encountered".