Skip to content

Verification fails to find the issuer key when signed with a subkey #1682

Answered by larabr
etnbrd asked this question in Q&A
Discussion options

You must be logged in to vote

The key input file is not formatted properly to be read using readKeys. That function expect a specific type of armored data, which includes multiple keys in a single block, not separate armored keys. Your code is thus reading the first key only, which is not the one that signed the message.
We don't have an API to automatically read the key file you are provided, you'll have to manually extract the separate keys (one option is to split the text based on the armored delimiters -----BEGIN PGP PUBLIC KEY BLOCK-----.

In this case, the second key is the signing one, in case you want to extract it manually, to test that it works 🙂

PS: passing expectSigned: true to verify is sufficient to confi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@etnbrd
Comment options

Answer selected by etnbrd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1681 on September 20, 2023 16:34.