explicit "this" qualifiers

This commit is contained in:
Josh Brown
2023-10-03 16:13:54 -07:00
parent ad86e576a4
commit de2e8b0b12
3 changed files with 7 additions and 7 deletions

View File

@@ -78,7 +78,7 @@ abstract class KeyGeneration extends CryptographicOperation {
abstract CryptographicAlgorithm getAlgorithm();
int getKeySizeInBits(CryptographicAlgorithm alg) {
result = getKeyConfigurationSource(alg).(Literal).getValue().toInt()
result = this.getKeyConfigurationSource(alg).(Literal).getValue().toInt()
}
predicate hasConstantKeySize(CryptographicAlgorithm alg) { exists(this.getKeySizeInBits(alg)) }
@@ -87,7 +87,7 @@ abstract class KeyGeneration extends CryptographicOperation {
exists(this.getKeyConfigurationSource(alg))
}
Expr getAKeyConfigurationSource() { result = getKeyConfigurationSource(_) }
Expr getAKeyConfigurationSource() { result = this.getKeyConfigurationSource(_) }
}
abstract class AsymmetricKeyGeneration extends KeyGeneration { }

View File

@@ -62,7 +62,7 @@ abstract class CryptographicOperation extends CryptographicArtifact, API::CallNo
/** A key generation operation for asymmetric keys */
abstract class KeyGen extends CryptographicOperation {
int getAKeySizeInBits() { result = getKeySizeInBits(_) }
int getAKeySizeInBits() { result = this.getKeySizeInBits(_) }
final predicate hasKeySize(DataFlow::Node configSrc) { exists(this.getKeySizeInBits(configSrc)) }

View File

@@ -246,8 +246,8 @@ module Encryption {
override string getName() {
exists(string rawName | genericAEADArtifact(_, rawName) = this |
result = normalizedBlockNames(rawName) or
result = normalizedEncryptionName(rawName)
result = this.normalizedBlockNames(rawName) or
result = this.normalizedEncryptionName(rawName)
)
}
@@ -313,9 +313,9 @@ module Encryption {
}
override DataFlow::Node getKeyConfigSrc() {
result = keyBitLengthSrc()
result = this.keyBitLengthSrc()
or
not exists(keyBitLengthSrc()) and result = this
not exists(this.keyBitLengthSrc()) and result = this
}
}
}