aboutsummaryrefslogtreecommitdiffstats
path: root/entities/identity
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-08-12 14:05:02 +0200
committerGitHub <noreply@github.com>2023-08-12 14:05:02 +0200
commit20e62977a0509e2c79ef5d8d9173103a278b78ff (patch)
tree9a39ab11d0373caeaf34f2d06188c481d27f67d7 /entities/identity
parenta0d225ce23af9f5dbe31521f19485c66d409e573 (diff)
parent429b913dc5519babfab47bf65222e32415a6c1bd (diff)
downloadgit-bug-20e62977a0509e2c79ef5d8d9173103a278b78ff.tar.gz
Merge pull request #1088 from MichaelMure/dependabot/go_modules/github.com/99designs/gqlgen-0.17.36
build(deps): bump github.com/99designs/gqlgen from 0.17.20 to 0.17.36
Diffstat (limited to 'entities/identity')
-rw-r--r--entities/identity/key.go19
1 files changed, 8 insertions, 11 deletions
diff --git a/entities/identity/key.go b/entities/identity/key.go
index 87271dd5..5ded31fa 100644
--- a/entities/identity/key.go
+++ b/entities/identity/key.go
@@ -217,18 +217,15 @@ func (k *Key) storePrivate(repo repository.RepoKeyring) error {
}
func (k *Key) PGPEntity() *openpgp.Entity {
- uid := packet.NewUserId("", "", "")
- return &openpgp.Entity{
+ e := &openpgp.Entity{
PrimaryKey: k.public,
PrivateKey: k.private,
- Identities: map[string]*openpgp.Identity{
- uid.Id: {
- Name: uid.Id,
- UserId: uid,
- SelfSignature: &packet.Signature{
- IsPrimaryId: func() *bool { b := true; return &b }(),
- },
- },
- },
+ Identities: map[string]*openpgp.Identity{},
+ }
+ // somehow initialize the proper fields with identity, self-signature ...
+ err := e.AddUserId("name", "", "", nil)
+ if err != nil {
+ panic(err)
}
+ return e
}