Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
reinkrul committed Oct 17, 2023
1 parent 45c0c29 commit e07f2d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions vdr/didkey/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ func (r Resolver) Resolve(id did.DID, _ *resolver.ResolveMetadata) (*did.Documen
if rsaKey.Size() < 256 {
return nil, nil, errors.New("did:key: RSA public key is too small (must be at least 2048 bits)")
}
key = rsaKey
default:
return nil, nil, fmt.Errorf("did:key: unsupported public key type: 0x%x", keyType)
}
Expand Down
2 changes: 1 addition & 1 deletion vdr/didkey/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestResolver_Resolve(t *testing.T) {
t.Run("unsupported key type", func(t *testing.T) {
didKey := createDIDKey(multicodec.Aes256, []byte{1, 2, 3})
_, _, err := Resolver{}.Resolve(did.MustParseDID(didKey), nil)
require.EqualError(t, err, "did:key: unsupported public key type: 162")
require.EqualError(t, err, "did:key: unsupported public key type: 0xa2")
})
t.Run("verify created DID document", func(t *testing.T) {
const expected = `
Expand Down

0 comments on commit e07f2d1

Please sign in to comment.