Open alexkravets opened 3 years ago
Thanks for reporting this... this is bad.
The reason is for this bug is confusion over trying to match the behavior of JWS.verify in jose
, which returns the verified payload or throws an error....
I think the correct behavior for "verifyDetached"... should be:
(detachedJws:string, messageDigest:Buffer, publicKeyJwk: any): Promise<Boolean>
For these methods to work consistently and return
false
on verification failure, I had to wrap into try / catch like here:Wondering which implementation
secp256k1
orEdDSA
supposed to be original one.