File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
cpp/ql/src/experimental/campaigns/nccoe-pqc-migration/QuantumVulnerableDiscovery/WinCng Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,14 @@ class BCryptEncryptArgumentSink extends BCryptOpenAlgorithmProviderSink {
21
21
}
22
22
23
23
// ----------------- 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
+
24
32
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 ( ) ) }
33
34
}
You can’t perform that action at this time.
0 commit comments