diff --git a/pkg/core/object/fmt.go b/pkg/core/object/fmt.go index abf8f02c..e6d8174f 100644 --- a/pkg/core/object/fmt.go +++ b/pkg/core/object/fmt.go @@ -64,6 +64,8 @@ var errNoExpirationEpoch = errors.New("missing expiration epoch attribute") var errTombstoneExpiration = errors.New("tombstone body and header contain different expiration values") +var errMissingSignature = errors.New("missing signature") + func defaultCfg() *cfg { return new(cfg) } @@ -135,8 +137,7 @@ func (v *FormatValidator) Validate(ctx context.Context, obj *objectSDK.Object, u func (v *FormatValidator) validateSignatureKey(obj *objectSDK.Object) error { sig := obj.Signature() if sig == nil { - // TODO(@cthulhu-rider): #468 use "const" error - return errors.New("missing signature") + return errMissingSignature } var sigV2 refs.Signature @@ -157,8 +158,6 @@ func (v *FormatValidator) validateSignatureKey(obj *objectSDK.Object) error { return v.checkOwnerKey(*obj.OwnerID(), key) } - // FIXME: #1159 perform token verification - return nil }