mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Crypto: Fix bug in MacOperationNode constructor with detecting if the operation is also used for signatures.
This commit is contained in:
@@ -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" }
|
||||
|
||||
Reference in New Issue
Block a user