Verifying a signed CoRIM using the public key gives:
> cocli corim verify -f signed-corim.cbor pub_key.jwk
Error: error loading verifying key from ./pub_key.jwk: argument to AssignIfCompatible() must be compatible with *ecdsa.PublicKey (was *crypto.Signer)
When private key is given as input, verification passes.
This happens because the verify function calls corim.NewPublicKeyFromJWK, which tries to initialize crypto.Signer using just a public key: corim/signer.go:132. This results in an error.
To fix this, either corim.NewPublicKeyFromJWK should be fixed or deserialization logic for JWK should be implemented in cocli.
Verifying a signed CoRIM using the public key gives:
When private key is given as input, verification passes.
This happens because the verify function calls
corim.NewPublicKeyFromJWK, which tries to initializecrypto.Signerusing just a public key: corim/signer.go:132. This results in an error.To fix this, either
corim.NewPublicKeyFromJWKshould be fixed or deserialization logic for JWK should be implemented in cocli.