mirror of https://github.com/perkeep/perkeep.git
camerrors: rename MissingKeyBlob to ErrMissingKeyBlob
Change-Id: I15b7e9c1d82b8933f7969d50030ae02fa27deae7
This commit is contained in:
parent
52ed51b80b
commit
3f68f21f56
|
@ -22,4 +22,7 @@ import (
|
|||
"errors"
|
||||
)
|
||||
|
||||
var MissingKeyBlob = errors.New("key blob not found")
|
||||
// ErrMissingKeyBlob is returned by the jsonsign handler when a
|
||||
// verification fails because the public key for a signed blob is
|
||||
// missing.
|
||||
var ErrMissingKeyBlob = errors.New("key blob not found")
|
||||
|
|
|
@ -138,11 +138,11 @@ func (vr *VerifyRequest) ParsePayloadMap() bool {
|
|||
func (vr *VerifyRequest) FindAndParsePublicKeyBlob() bool {
|
||||
reader, _, err := vr.fetcher.FetchStreaming(vr.CamliSigner)
|
||||
if err != nil {
|
||||
log.Printf("error fetching public key blob: %v", err)
|
||||
log.Printf("error fetching public key blob %v: %v", vr.CamliSigner, err)
|
||||
// TODO(mpl): we're losing some info here, so maybe
|
||||
// create an error type that contains the reason,
|
||||
// instead of logging the reason.
|
||||
vr.Err = camerrors.MissingKeyBlob
|
||||
vr.Err = camerrors.ErrMissingKeyBlob
|
||||
return false
|
||||
}
|
||||
defer reader.Close()
|
||||
|
|
Loading…
Reference in New Issue