MCPcopy Create free account
hub / github.com/cli/cli / dumpSignedTimestamps

Function dumpSignedTimestamps

pkg/cmd/attestation/inspect/inspect.go:325–344  ·  view source on GitHub ↗
(entity *bundle.Bundle)

Source from the content-addressed store, hash-verified

323}
324
325func dumpSignedTimestamps(entity *bundle.Bundle) ([]time.Time, error) {
326 timestamps := []time.Time{}
327
328 signedTimestamps, err := entity.Timestamps()
329 if err != nil {
330 return nil, err
331 }
332
333 for _, signedTsBytes := range signedTimestamps {
334 tsaTime, err := timestamp.ParseResponse(signedTsBytes)
335
336 if err != nil {
337 return nil, err
338 }
339
340 timestamps = append(timestamps, tsaTime.Time)
341 }
342
343 return timestamps, nil
344}

Callers 1

runInspectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected