aboutsummaryrefslogtreecommitdiff
path: root/object
diff options
context:
space:
mode:
Diffstat (limited to 'object')
-rw-r--r--object/id/algorithm_tables.go2
-rw-r--r--object/signed/tag/parse.go2
-rw-r--r--object/tree/remove.go1
3 files changed, 5 insertions, 0 deletions
diff --git a/object/id/algorithm_tables.go b/object/id/algorithm_tables.go
index 92b77de0..e4ec3257 100644
--- a/object/id/algorithm_tables.go
+++ b/object/id/algorithm_tables.go
@@ -61,10 +61,12 @@ func init() { //nolint:gochecknoinits
}
info.emptyTree = info.sum(emptyTreeInput)
+
algorithmByName[info.name] = algo
if info.signatureHeaderName != "" {
algorithmBySignatureHeaderName[info.signatureHeaderName] = algo
}
+
supportedAlgorithms = append(supportedAlgorithms, algo)
}
}
diff --git a/object/signed/tag/parse.go b/object/signed/tag/parse.go
index e2556355..b2061d3f 100644
--- a/object/signed/tag/parse.go
+++ b/object/signed/tag/parse.go
@@ -52,6 +52,7 @@ func Parse(body []byte, storageAlgo objectid.Algorithm) (*Tag, error) {
}
payloadStart := 0
+
payloadEnd := signatureStart
if signatureStart == len(body) {
payloadEnd = len(body)
@@ -122,6 +123,7 @@ func Parse(body []byte, storageAlgo objectid.Algorithm) (*Tag, error) {
}
tag.appendPayloadRange(payloadStart, payloadEnd)
+
if signatureStart != len(body) {
tag.signatures[storageAlgo] = append(tag.signatures[storageAlgo], byteRange{
start: signatureStart,
diff --git a/object/tree/remove.go b/object/tree/remove.go
index fe4fda32..9a099842 100644
--- a/object/tree/remove.go
+++ b/object/tree/remove.go
@@ -17,6 +17,7 @@ func (tree *Tree) RemoveEntry(name []byte) error {
})
if index >= 0 {
tree.Entries = slices.Delete(tree.Entries, index, index+1)
+
return nil
}