More reformatting

This commit is contained in:
REDMOND\brodes
2022-11-08 12:52:41 -05:00
parent b242b4bba6
commit 46bfa35c35

View File

@@ -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()) }
}