Skip to content

Commit 46bfa35

Browse files
committed
More reformatting
1 parent b242b4b commit 46bfa35

File tree

1 file changed

+9
-8
lines changed
  • cpp/ql/src/experimental/campaigns/nccoe-pqc-migration/QuantumVulnerableDiscovery/WinCng

1 file changed

+9
-8
lines changed

cpp/ql/src/experimental/campaigns/nccoe-pqc-migration/QuantumVulnerableDiscovery/WinCng/WindowsCng.qll

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ class BCryptEncryptArgumentSink extends BCryptOpenAlgorithmProviderSink {
2121
}
2222

2323
// ----------------- SOURCES -----------------------
24+
predicate providerString(StringLiteral lit) {
25+
exists(string s | s = lit.getValue() |
26+
s in ["DH", "DSA", "ECDSA", "ECDH"] or
27+
s.matches("ECDH%") or
28+
s.matches("RSA%")
29+
)
30+
}
31+
2432
class BCryptOpenAlgorithmProviderPqcVulnerableAlgorithmsSource extends BCryptOpenAlgorithmProviderSource {
25-
BCryptOpenAlgorithmProviderPqcVulnerableAlgorithmsSource() {
26-
this.asExpr() instanceof StringLiteral and
27-
(
28-
this.asExpr().getValue() in ["DH", "DSA", "ECDSA", "ECDH"] or
29-
this.asExpr().getValue().matches("ECDH%") or
30-
this.asExpr().getValue().matches("RSA%")
31-
)
32-
}
33+
BCryptOpenAlgorithmProviderPqcVulnerableAlgorithmsSource() { providerString(this.asExpr()) }
3334
}

0 commit comments

Comments
 (0)