From 3b238c5a81da51cc9b346e1b4f21cedc14433b54 Mon Sep 17 00:00:00 2001 From: "Moritz F. Kuntze" Date: Thu, 18 Jul 2019 14:13:44 +0200 Subject: [PATCH] Revert erroneous fix and fix #287 --- go/src/gopenpgpwrapper/gopenpgpwrapper.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go/src/gopenpgpwrapper/gopenpgpwrapper.go b/go/src/gopenpgpwrapper/gopenpgpwrapper.go index 1e93bed..cf96b08 100644 --- a/go/src/gopenpgpwrapper/gopenpgpwrapper.go +++ b/go/src/gopenpgpwrapper/gopenpgpwrapper.go @@ -10,6 +10,10 @@ import ( ) type Key struct { + kr crypto.KeyRing +} + +func (k *Key) GetKeyID() string { if len(k.kr.GetEntities()) > 0 { return k.kr.GetEntities()[0].PrimaryKey.KeyIdShortString() } else { @@ -17,10 +21,6 @@ type Key struct { } } -func (k *Key) GetKeyID() string { - return k.kr.FirstKeyID -} - func (k *Key) Encrypt(plaintext []byte, armor bool) []byte { var b bytes.Buffer var w io.WriteCloser