-
Notifications
You must be signed in to change notification settings - Fork 9
OpenPGP public key signing/decryption support #3
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
|
I'll build an aptly patch to make use of this, and report back on any issues. |
|
There's an issue with the signing process by the looks. It uses |
|
That should be fixed as well now. It seems functional, just missing docs at this point. But I'll let you try it out first in case larger changes still have to be made. |
|
Hmm. This is easy to implement for detached signatures. Cleartext signatures (which, alas, are used for Debian index files) look like another place where the upstream library expects a literal private key passed in... though admittedly I haven't looked past the documentation and into the source for golang.org/x/crypto/openpgp/clearsign yet. |
|
I think it calls the same Will try that, and perhaps add another |
|
Ahh -- looking closer, I see what you mean; the result of calling Updating the aptly patch to take advantage of that. |
|
Yup, worked nicely; apologies for the alarmism above. Can I check in an amended version of this PR with a |
|
I'm about to push a commit that adds -c to the sign command. |
|
A few possible TODO:
|
|
So, this is bizarre. Code builds fine for me, including the aptly draft PR using it (aptly-dev/aptly#955). However, in aptly's CI... ...even though they're using the same v0.0.0-20190320223903-b7391e95e576 release of golang.org/x/crypto that tpmk is. |
|
The |
|
I changed the internal methods a little to make it possible to read a key from disk and attach the private key to an openpgp.Entity. This allows library users to operate on data with the standard lib functions. It didn't change the command line interface. |
|
Since someone actually fixed the openpgp library to support crypto.Decryptor keys, it was pretty straightforward to add decryption as well. Might be useful. So there are now 3 sub-commands (generate, sign, decrypt). |
Implements #2