From 4d8f3f0e79894b6a83a84e29debefed9b7bf2b12 Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Sun, 25 Feb 2018 01:45:56 -0800 Subject: [PATCH] Creates openpgp.Entity --- keyring/keyring.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/keyring/keyring.go b/keyring/keyring.go index 458ac9d..f330f94 100644 --- a/keyring/keyring.go +++ b/keyring/keyring.go @@ -1,7 +1,17 @@ package keyring -import "fmt" +import ( + "log" + + "github.com/pkg/errors" + "golang.org/x/crypto/openpgp" +) func NewKeyPair(root, name, email string) error { - return fmt.Errorf("NYI: %v, %v, %v", root, name, email) + e, err := openpgp.NewEntity(name, "pm", email, nil) + if err != nil { + errors.Wrap(err, "new entity") + } + log.Printf("%+v", e) + return errors.New("NYI") }