mirror of
https://github.com/github/codeql.git
synced 2026-02-15 14:33:40 +01:00
More reformatting
This commit is contained in:
@@ -21,13 +21,14 @@ class BCryptEncryptArgumentSink extends BCryptOpenAlgorithmProviderSink {
|
||||
}
|
||||
|
||||
// ----------------- SOURCES -----------------------
|
||||
class BCryptOpenAlgorithmProviderPqcVulnerableAlgorithmsSource extends BCryptOpenAlgorithmProviderSource {
|
||||
BCryptOpenAlgorithmProviderPqcVulnerableAlgorithmsSource() {
|
||||
this.asExpr() instanceof StringLiteral and
|
||||
(
|
||||
this.asExpr().getValue() in ["DH", "DSA", "ECDSA", "ECDH"] or
|
||||
this.asExpr().getValue().matches("ECDH%") or
|
||||
this.asExpr().getValue().matches("RSA%")
|
||||
)
|
||||
}
|
||||
predicate providerString(StringLiteral lit) {
|
||||
exists(string s | s = lit.getValue() |
|
||||
s in ["DH", "DSA", "ECDSA", "ECDH"] or
|
||||
s.matches("ECDH%") or
|
||||
s.matches("RSA%")
|
||||
)
|
||||
}
|
||||
|
||||
class BCryptOpenAlgorithmProviderPqcVulnerableAlgorithmsSource extends BCryptOpenAlgorithmProviderSource {
|
||||
BCryptOpenAlgorithmProviderPqcVulnerableAlgorithmsSource() { providerString(this.asExpr()) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user