Crypto: Fix bug in MacOperationNode constructor with detecting if the operation is also used for signatures.

This commit is contained in:
REDMOND\brodes
2025-10-02 15:20:59 -04:00
parent cbe34f101b
commit 507174e44f

View File

@@ -1597,8 +1597,8 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
final class MacOperationNode extends SignatureOrMacOperationNode {
MacOperationNode() {
this.getKeyOperationSubtype() = TMacMode() and
// If the type could be a mac, then we will not consider it a mac operation exclusively.
not exists(KeyOperationSubtype t | t = this.getKeyOperationSubtype() and t = TMacMode())
// If the type could be a signature, then we will not consider it a mac operation exclusively.
not exists(KeyOperationSubtype t | t = this.getKeyOperationSubtype() and t = TSignMode())
}
final override string getInternalType() { result = "MACOperation" }