Skip to content

Commit

Permalink
fix(cmd): download script
Browse files Browse the repository at this point in the history
  • Loading branch information
matoous committed Jun 28, 2024
1 parent 428fcdf commit 8d4ff0c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
5 changes: 2 additions & 3 deletions aaguid.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package aaguids

import (
_ "embed"
"time"
)

//go:embed raw.json
Expand Down Expand Up @@ -143,7 +142,7 @@ type MetadataStatement struct {
// A human-readable, short description of the authenticator, in English.
Description string
// A list of human-readable short descriptions of the authenticator in different languages.
AlternativeDescriptions []AlternativeDescription `json:"alternativeDescriptions"`
AlternativeDescriptions AlternativeDescription `json:"alternativeDescriptions"`
// Earliest (i.e. lowest) trustworthy authenticatorVersion meeting the requirements specified in this metadata statement.
// Adding new StatusReport entries with status UPDATE_AVAILABLE to the metadata BLOB object [FIDOMetadataService] MUST also change this authenticatorVersion if the update fixes severe security issues, e.g. the ones reported by preceding StatusReport entries with status code USER_VERIFICATION_BYPASS,ATTESTATION_KEY_COMPROMISE,USER_KEY_REMOTE_COMPROMISE,USER_KEY_PHYSICAL_COMPROMISE,REVOKED.
// It is RECOMMENDED to assume increased risk if this version is higher (newer) than the firmware version present in an authenticator. For example, if a StatusReport entry with status USER_VERIFICATION_BYPASS or USER_KEY_REMOTE_COMPROMISE precedes the UPDATE_AVAILABLE entry, than any firmware version lower (older) than the one specified in the metadata statement is assumed to be vulnerable.
Expand Down Expand Up @@ -224,7 +223,7 @@ type Entry struct {
// An array of status reports applicable to this authenticator.
StatusReports []StatusReport `json:"statusReports"`
// ISO-8601 formatted date since when the status report array was set to the current value.
TimeOfLastStatusChange time.Time `json:"timeOfLastStatusChange"`
TimeOfLastStatusChange string `json:"timeOfLastStatusChange"`
// URL of a list of rogue (i.e. untrusted) individual authenticators.
RogueListURL string `json:"rogueListURL"`
// base64url(string[1..512])
Expand Down
9 changes: 6 additions & 3 deletions cmd/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
module github.com/aaguids-go/cmd
module github.com/sumup/aaguid-go/cmd

go 1.22.0

replace github.com/sumup/aaguid-go => ../

require github.com/lestrrat-go/jwx/v2 v2.0.21
require (
github.com/lestrrat-go/jwx/v2 v2.0.21
github.com/sumup/aaguid-go v0.0.0-00010101000000-000000000000
)

require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
Expand All @@ -15,7 +18,7 @@ require (
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/sumup/aaguid-go v0.0.0-00010101000000-000000000000 // indirect
github.com/sumup/aaguids-go v0.0.0-20240612214548-428fcdf43331 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/sys v0.18.0 // indirect
)
2 changes: 2 additions & 0 deletions cmd/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/sumup/aaguids-go v0.0.0-20240612214548-428fcdf43331 h1:cZM4asQ1+k99u+9ys8RvveHOLBpQYjXWihnA+2310hI=
github.com/sumup/aaguids-go v0.0.0-20240612214548-428fcdf43331/go.mod h1:94E7K14VcFqz4qLDXzsgVCRG5LFAEbcr7gRSL1DMvFs=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
Expand Down
11 changes: 5 additions & 6 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ import (
"fmt"
"net/http"
"os"
"time"

"github.com/lestrrat-go/jwx/v2/jws"

"github.com/sumup/aaguid-go"
aaguids "github.com/sumup/aaguid-go"
)

type Manifest struct {
LegalHeader string `json:"legalHeader"`
No int `json:"no"`
NextUpdate time.Time `json:"nextUpdate"`
Entries []aaguid.Entry `json:"entries"`
LegalHeader string `json:"legalHeader"`
No int `json:"no"`
NextUpdate string `json:"nextUpdate"`
Entries []aaguids.Entry `json:"entries"`
}

func main() {
Expand Down
2 changes: 1 addition & 1 deletion raw.json

Large diffs are not rendered by default.

0 comments on commit 8d4ff0c

Please sign in to comment.