go.crypto/openpgp: fix user id signing.
Entity.SignIdentity used the wrong signature function and produced invalid certification signatures. Fixed. VerifyUserIdSignature was used for checking the self-signature on an identity, but didn't support anything but a self-signature. This change alters the low-level API so that checking cross-signatures is possible. Fixes golang/go#7371. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/96240043
This commit is contained in:
@@ -133,7 +133,7 @@ func TestEcc384Serialize(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
uidSig := p.(*Signature)
|
||||
err = pubkey.VerifyUserIdSignature(uid.Id, uidSig)
|
||||
err = pubkey.VerifyUserIdSignature(uid.Id, pubkey, uidSig)
|
||||
if err != nil {
|
||||
t.Error(err, ": UID")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user