openpgp: correct NewEntity name creation
Confusingly, `Identity.Name` should actually refer to `uid.Id` and not `uid.Name`. This fixes the code in NewEntity, and creates a test case to verify. Change-Id: Id46de876fc7b0359faecfeb9b09a8e454710d485 Reviewed-on: https://go-review.googlesource.com/92595 Reviewed-by: Adam Langley <agl@golang.org>
This commit is contained in:
committed by
Adam Langley
parent
9de5f2eaf7
commit
3a6c3ce65c
+1
-1
@@ -486,7 +486,7 @@ func NewEntity(name, comment, email string, config *packet.Config) (*Entity, err
|
||||
}
|
||||
isPrimaryId := true
|
||||
e.Identities[uid.Id] = &Identity{
|
||||
Name: uid.Name,
|
||||
Name: uid.Id,
|
||||
UserId: uid,
|
||||
SelfSignature: &packet.Signature{
|
||||
CreationTime: currentTime,
|
||||
|
||||
Reference in New Issue
Block a user