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

x/crypto/openpgp: NewEntity won't Serialize #6483

Closed
jaekwon opened this issue Sep 26, 2013 · 7 comments
Closed

x/crypto/openpgp: NewEntity won't Serialize #6483

jaekwon opened this issue Sep 26, 2013 · 7 comments

Comments

@jaekwon
Copy link

jaekwon commented Sep 26, 2013

The entity returned from NewEntity won't serialize fully. The returned error is
"openpgp: invalid argument: Signature: need to call Sign, SignUserId or SignKey
before Serialize".

Calling SerializePrivate() first mitigates this problem, as that function ensures that
the signature packets are properly signed.
@rsc
Copy link
Contributor

rsc commented Oct 18, 2013

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 2:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 3:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 4:

Labels changed: added repo-crypto.

@agl
Copy link
Contributor

agl commented Aug 1, 2014

Comment 5:

Owner changed to @agl.

@agl
Copy link
Contributor

agl commented Aug 1, 2014

Comment 6:

Sorry about the delay - this bug didn't get routed to me.
NewEntity was always intended to be followed by SerializePrivate (perhaps with some
additional user IDs added inbetween). However, you aren't the only person who has been
confused by this, so maybe it was a mistake.
https://golang.org/cl/115560043 moves the signing into NewEntity, which might
be an improvement.

@mikioh mikioh changed the title go.crypto/openpgp: NewEntity won't Serialize openpgp: NewEntity won't Serialize Jan 7, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title openpgp: NewEntity won't Serialize x/crypto/openpgp: NewEntity won't Serialize Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-crypto label Apr 14, 2015
@FiloSottile
Copy link
Contributor

Per the accepted #44226 proposal and due to lack of maintenance, the golang.org/x/crypto/openpgp package is now frozen and deprecated. No new changes will be accepted except for security fixes. The package will not be removed.

If this is a security issue, please email security@golang.org and we will assess it and provide a fix.

If you're looking for alternatives, consider the crypto/ed25519 package for simple signatures, golang.org/x/mod/sumdb/note for inline signatures, or filippo.io/age for encryption. You can read a summary of OpenPGP issues and alternatives here.

If you are required to interoperate with OpenPGP systems and need a maintained package, we suggest considering one of multiple community forks of golang.org/x/crypto/openpgp. We don't endorse any specific one.

@golang golang locked and limited conversation to collaborators Mar 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants