Skip to content
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

age: add ParseRecipients #158

Closed
wants to merge 1 commit into from
Closed

Conversation

sylr
Copy link

@sylr sylr commented Nov 26, 2020

Add a ParseRecipients which can read a file containing one public key per line.

It also supports extracting public keys from the output of age-keygen.

Signed-off-by: Sylvain Rabot [email protected]

Signed-off-by: Sylvain Rabot <[email protected]>
@codesoap
Copy link
Contributor

codesoap commented Jan 1, 2021

As I wrote at #165 (comment), I think this is not a feature age needs. The age tool can be made to use public keys from a file like testdata/keys2.txt like this:

awk 'match($0,/age1.+/) {print "-r", substr($0, RSTART, RLENGTH)}' testdata/keys2.txt | xargs -J % age % -o data.age data

I also don't see the need for the new ParseRecipients() function, since I feel like this is as too "special"/unintuitive to be part of the official interface. I feel like this should be implemented in a separate library, if needed.

FiloSottile added a commit that referenced this pull request Jan 2, 2021
Fixes #84
Closes #165
Closes #158
Closes #115
Closes #64
Closes #43
Closes #20
FiloSottile added a commit that referenced this pull request Jan 2, 2021
Fixes #84
Fixes #66
Closes #165
Closes #158
Closes #115
Closes #64
Closes #43
Closes #20
FiloSottile added a commit that referenced this pull request Jan 3, 2021
Fixes #84
Fixes #66
Closes #165
Closes #158
Closes #115
Closes #64
Closes #43
Closes #20
@FiloSottile
Copy link
Owner

Hi! Thank you for contributing! I took a different path in #173, but it was useful to look at open PRs for the users' expectations. Let me know if that implementation works for you!

I wrote up an explanation of why I ended up implementing recipient files and not HTTPS sources on the mailing list, and I appreciate feedback! https://groups.google.com/g/age-dev/c/StmWsOyb-H8/m/a44rSBIWCAAJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants