try to support implemenations that put the key object in a seperate place
Ted Unangst tedu@tedunangst.com
Wed, 17 Jul 2019 16:33:38 -0400
1 files changed,
6 insertions(+),
3 deletions(-)
jump to
M
fun.go
→
fun.go
@@ -457,13 +457,16 @@ if err != nil {
log.Printf("error getting %s pubkey: %s", keyname, err) return } - var ok bool - data, ok = j.FindString([]string{"publicKey", "publicKeyPem"}) + keyobj, ok := j.GetMap("publicKey") + if ok { + j = keyobj + } + data, ok = j.GetString("publicKeyPem") if !ok { log.Printf("error finding %s pubkey", keyname) return } - _, ok = j.FindString([]string{"publicKey", "owner"}) + _, ok = j.GetString("owner") if !ok { log.Printf("error finding %s pubkey owner", keyname) return