diff --git a/go/src/gopenpgpwrapper/gopenpgpwrapper.go b/go/src/gopenpgpwrapper/gopenpgpwrapper.go index 9c7999a..cf96b08 100644 --- a/go/src/gopenpgpwrapper/gopenpgpwrapper.go +++ b/go/src/gopenpgpwrapper/gopenpgpwrapper.go @@ -14,7 +14,11 @@ type Key struct { } func (k *Key) GetKeyID() string { - return k.kr.FirstKeyID + if len(k.kr.GetEntities()) > 0 { + return k.kr.GetEntities()[0].PrimaryKey.KeyIdShortString() + } else { + return "" + } } func (k *Key) Encrypt(plaintext []byte, armor bool) []byte {