-
Notifications
You must be signed in to change notification settings - Fork 25
Concatenate keys into a single armored block #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/lgtm |
The `ReadArmoredKeyRing()` function from Golang's OpenPGP library only supports reading from a single armored block. Instead of concatenating the two armored keys together, the keys need to be dearmored, concatenated, and then armored. This will allow the OpenPGP library to read both keys into the keyring.
|
New changes are detected. LGTM label has been removed. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: eparis, jwforres, smarterclayton The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold Until the armored keys thing is resolved. An alternative (which I haven’t tried) to all of these changes is to change the parse order from armored -> unarmored to unarmored -> armored during CVO verify, which should work with the original keys. |
Go's parser requires the well-known labels [1,2]. [1]: https://github.com/golang/crypto/blob/20be4c3c3ed52bfccdb2d59a412ee1a936d175a7/openpgp/keys.go#L244 [2]: openshift/cluster-version-operator#196
Go's unarmor support does not let you reliably unarmor multiple blocks from a single reader, although we could possibly hack together a workaround in the CVO. But the single-armored block here works with existing CVO code (openshift/cluster-version-operator#196), so I prefer this approach. |
|
@eparis: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
The ReadArmoredKeyRing() function from Golang's OpenPGP library only
supports reading from a single armored block. Instead of concatenating
the two armored keys together, the keys need to be dearmored,
concatenated, and then armored. This will allow the OpenPGP library to
read both keys into the keyring.
The resulting armored block looks as follows: