try to support implemenations that put the key object in a seperate place
This commit is contained in:
parent
5b10e20388
commit
4232c63865
9
fun.go
9
fun.go
|
@ -457,13 +457,16 @@ func zaggy(keyname string) (key *rsa.PublicKey) {
|
||||||
log.Printf("error getting %s pubkey: %s", keyname, err)
|
log.Printf("error getting %s pubkey: %s", keyname, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var ok bool
|
keyobj, ok := j.GetMap("publicKey")
|
||||||
data, ok = j.FindString([]string{"publicKey", "publicKeyPem"})
|
if ok {
|
||||||
|
j = keyobj
|
||||||
|
}
|
||||||
|
data, ok = j.GetString("publicKeyPem")
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Printf("error finding %s pubkey", keyname)
|
log.Printf("error finding %s pubkey", keyname)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, ok = j.FindString([]string{"publicKey", "owner"})
|
_, ok = j.GetString("owner")
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Printf("error finding %s pubkey owner", keyname)
|
log.Printf("error finding %s pubkey owner", keyname)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue