diff --git a/packages/protocol/src/message.ts b/packages/protocol/src/message.ts index adb30a3d..242eb2c6 100644 --- a/packages/protocol/src/message.ts +++ b/packages/protocol/src/message.ts @@ -82,7 +82,7 @@ export abstract class Message { const signer = await Crypto.verify({ detachedPayload: this.digest(), signature: this.signature }) if (this.metadata.from !== signer) { // ensure that DID used to sign matches `from` property in metadata - throw new Error('Signature verification failed: Expected DID in kid of JWS header must match metadata.from') + throw new Error('Signature verification failed: Expected DID in kid of JWS header to match metadata.from') } return signer diff --git a/packages/protocol/src/resource.ts b/packages/protocol/src/resource.ts index 6c1d2f4d..f972c673 100644 --- a/packages/protocol/src/resource.ts +++ b/packages/protocol/src/resource.ts @@ -80,7 +80,7 @@ export abstract class Resource { const signer = await Crypto.verify({ detachedPayload: this.digest(), signature: this.signature }) if (this.metadata.from !== signer) { // ensure that DID used to sign matches `from` property in metadata - throw new Error('Signature verification failed: Expected DID in kid of JWS header must match metadata.from') + throw new Error('Signature verification failed: Expected DID in kid of JWS header to match metadata.from') } return signer