mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
explicit "this" qualifiers
This commit is contained in:
@@ -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 { }
|
||||
|
||||
@@ -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)) }
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user