From a3519d9fd0500c3daf57c2ff046c1acb422a6b6c Mon Sep 17 00:00:00 2001 From: Adel El-Beik Date: Fri, 18 Oct 2024 13:55:43 +0100 Subject: [PATCH] ENT-12314: Updated signature attachment constraint warning message to mention the key may be a rotated key. --- .../kotlin/net/corda/core/contracts/AttachmentConstraint.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/net/corda/core/contracts/AttachmentConstraint.kt b/core/src/main/kotlin/net/corda/core/contracts/AttachmentConstraint.kt index a5e5e7cd7d..9f090ef51b 100644 --- a/core/src/main/kotlin/net/corda/core/contracts/AttachmentConstraint.kt +++ b/core/src/main/kotlin/net/corda/core/contracts/AttachmentConstraint.kt @@ -117,7 +117,9 @@ data class SignatureAttachmentConstraint(val key: PublicKey) : AttachmentConstra override fun isSatisfiedBy(attachment: Attachment): Boolean { log.debug("Checking signature constraints: verifying $key in contract attachment signer keys: ${attachment.signerKeys}") return if (!key.isFulfilledBy(attachment.signerKeys.map { it })) { - log.warn("Untrusted signing key: expected $key. but contract attachment contains ${attachment.signerKeys}") + log.warn("Untrusted signing key: expected $key. but contract attachment contains ${attachment.signerKeys}." + + "The key on the attachment may be a rotated key. Will recheck. To remove this warning you should update your" + + "output state signature attachment constraint to use the same key as on the attachment.") false } else true