Skip to content

Commit c83cb53

Browse files
committed
Adding an instantiation of the additional flow step class to automatically apply to generic dataflow. Flow step passthrough comes from the algorithm to getter flow passthroughs.
1 parent 036035b commit c83cb53

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

cpp/ql/lib/experimental/Quantum/OpenSSL/OpenSSL.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ module OpenSSLModel {
88
import experimental.Quantum.OpenSSL.EVPCipherAlgorithmSource
99
import experimental.Quantum.OpenSSL.EVPHashAlgorithmSource
1010
import experimental.Quantum.OpenSSL.Random
11+
// Imports the additional algorithm flow step for OpenSSL
12+
import experimental.Quantum.OpenSSL.OpenSSLAlgorithmGetter
1113

1214

1315
// // TODO: trace CTX from init variants to the context arg of EVP update calls

cpp/ql/lib/experimental/Quantum/OpenSSL/OpenSSLAlgorithmGetter.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ import LibraryDetector
44
import OpenSSLKnownAlgorithmConstants
55
import experimental.Quantum.Language
66

7+
class OpenSSLAlgorithmAdditionalFlowStep extends AdditionalFlowInputStep {
8+
OpenSSLAlgorithmAdditionalFlowStep() { exists(AlgorithmPassthroughCall c | c.getInNode() = this) }
9+
10+
override DataFlow::Node getOutput() {
11+
exists(AlgorithmPassthroughCall c | c.getInNode() = this and c.getOutNode() = result)
12+
}
13+
}
14+
715
module AlgGetterToAlgConsumerConfig implements DataFlow::ConfigSig {
816
predicate isSource(DataFlow::Node source) {
917
exists(OpenSSLAlgorithmGetterCall c | c.getResultNode() = source)

0 commit comments

Comments
 (0)