Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe committed May 31, 2024
1 parent 415d4d4 commit 74aaea8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions impl/internal/did/did.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ func CreateDIDDHTDID(pubKey ed25519.PublicKey, opts CreateDIDDHTOpts) (*did.Docu
// create the did document
kid := "0"
key0JWK, err := jwx.PublicKeyToPublicKeyJWK(&kid, pubKey)
//nolint:staticcheck
key0JWK.ALG = string(crypto.EdDSA)
if err != nil {
return nil, err
Expand Down Expand Up @@ -844,6 +845,7 @@ func parseTxtData(data string) map[string]string {
func algIsDefaultForJWK(jwk jwx.PublicKeyJWK) bool {
// Ed25519 : EdDSA
if jwk.CRV == crypto.Ed25519.String() && jwk.KTY == jwa.OKP.String() {
//nolint:staticcheck
return jwk.ALG == string(crypto.EdDSA)
}
// secp256k1 : ES256K
Expand All @@ -866,6 +868,7 @@ func algIsDefaultForJWK(jwk jwx.PublicKeyJWK) bool {
func defaultAlgForJWK(jwk jwx.PublicKeyJWK) string {
// Ed25519 : EdDSA
if jwk.CRV == crypto.Ed25519.String() && jwk.KTY == jwa.OKP.String() {
//nolint:staticcheck
return string(crypto.EdDSA)
}
// secp256k1 : ES256K
Expand Down

0 comments on commit 74aaea8

Please sign in to comment.