Skip to content

Commit 58a0a61

Browse files
committed
rm one-shot class
1 parent 9418e02 commit 58a0a61

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPCipherOperation.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ abstract class EVP_Cipher_Operation extends EVPOperation, Crypto::KeyOperationIn
5252
}
5353
}
5454

55-
class EVP_Cipher_Call extends EVPOneShot, EVP_Cipher_Operation {
55+
class EVP_Cipher_Call extends EVPOperation, EVP_Cipher_Operation {
5656
EVP_Cipher_Call() { this.(Call).getTarget().getName() = "EVP_Cipher" }
5757

5858
override Expr getInputArg() { result = this.(Call).getArgument(2) }

cpp/ql/lib/experimental/quantum/OpenSSL/Operations/EVPHashOperation.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class EVP_Digest_Update_Call extends EVPUpdate {
1515
}
1616

1717
//https://docs.openssl.org/3.0/man3/EVP_DigestInit/#synopsis
18-
class EVP_Q_Digest_Operation extends EVPOneShot, Crypto::HashOperationInstance {
18+
class EVP_Q_Digest_Operation extends EVPOperation, Crypto::HashOperationInstance {
1919
EVP_Q_Digest_Operation() { this.(Call).getTarget().getName() = "EVP_Q_digest" }
2020

2121
override Expr getAlgorithmArg() { result = this.(Call).getArgument(1) }
@@ -31,15 +31,15 @@ class EVP_Q_Digest_Operation extends EVPOneShot, Crypto::HashOperationInstance {
3131
override Expr getOutputArg() { result = this.(Call).getArgument(5) }
3232

3333
override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
34-
result = EVPOneShot.super.getOutputArtifact()
34+
result = EVPOperation.super.getOutputArtifact()
3535
}
3636

3737
override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
38-
result = EVPOneShot.super.getInputConsumer()
38+
result = EVPOperation.super.getInputConsumer()
3939
}
4040
}
4141

42-
class EVP_Digest_Operation extends EVPOneShot, Crypto::HashOperationInstance {
42+
class EVP_Digest_Operation extends EVPOperation, Crypto::HashOperationInstance {
4343
EVP_Digest_Operation() { this.(Call).getTarget().getName() = "EVP_Digest" }
4444

4545
// There is no context argument for this function
@@ -58,11 +58,11 @@ class EVP_Digest_Operation extends EVPOneShot, Crypto::HashOperationInstance {
5858
override Expr getOutputArg() { result = this.(Call).getArgument(2) }
5959

6060
override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
61-
result = EVPOneShot.super.getOutputArtifact()
61+
result = EVPOperation.super.getOutputArtifact()
6262
}
6363

6464
override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
65-
result = EVPOneShot.super.getInputConsumer()
65+
result = EVPOperation.super.getInputConsumer()
6666
}
6767
}
6868

cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperationBase.qll

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private module AlgGetterToAlgConsumerFlow = DataFlow::Global<AlgGetterToAlgConsu
9393

9494
/**
9595
* The base class for all operations of the EVP API.
96-
* Currently final calls and one-shot calls are implemented.
96+
* This captures one-shot APIs (with and without an initilizer call) and final calls.
9797
* Provides some default methods for Crypto::KeyOperationInstance class
9898
*/
9999
abstract class EVPOperation extends OpenSSLOperation {
@@ -162,8 +162,3 @@ abstract class EVPFinal extends EVPOperation {
162162
*/
163163
override Expr getOutputArg() { result = this.getUpdateCalls().getOutputArg() }
164164
}
165-
166-
/**
167-
* One-shot calls of EVP API.
168-
*/
169-
abstract class EVPOneShot extends EVPOperation { }

0 commit comments

Comments
 (0)