Skip to content

Commit f5ce07d

Browse files
committed
Class re-org
1 parent b15a5a9 commit f5ce07d

File tree

1 file changed

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

1 file changed

+16
-2
lines changed

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

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,28 @@ predicate vulnProviderLiteral(StringLiteral lit) {
3333
* Argument at index 0 of call to BCryptSignHash
3434
*/
3535
class BCryptSignHashArgumentSink extends BCryptOpenAlgorithmProviderSink {
36-
BCryptSignHashArgumentSink() { isCallArgument("BCryptSignHash", this.asExpr(), 0) }
36+
int index;
37+
string funcName;
38+
39+
BCryptSignHashArgumentSink() {
40+
index = 0 and
41+
funcName = "BCryptSignHash" and
42+
isCallArgument(funcName, this.asExpr(), index)
43+
}
3744
}
3845

3946
/**
4047
* Argument at index 0 of call to BCryptEncrypt
4148
*/
4249
class BCryptEncryptArgumentSink extends BCryptOpenAlgorithmProviderSink {
43-
BCryptEncryptArgumentSink() { isCallArgument("BCryptEncrypt", this.asExpr(), 0) }
50+
int index;
51+
string funcName;
52+
53+
BCryptEncryptArgumentSink() {
54+
index = 0 and
55+
funcName = "BCryptEncrypt" and
56+
isCallArgument(funcName, this.asExpr(), index)
57+
}
4458
}
4559

4660
// ----------------- Default SOURCES -----------------------

0 commit comments

Comments
 (0)