ENT-12314: Updated signature attachment constraint warning message to mention the key may be a rotated key.

This commit is contained in:
Adel El-Beik 2024-10-18 13:55:43 +01:00
parent 60c5e97d54
commit a3519d9fd0

View File

@ -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