rm one-shot class

This commit is contained in:
GrosQuildu
2025-05-29 11:33:52 +02:00
committed by Paweł Płatek
parent 328cf798bf
commit f04fa58c8b
3 changed files with 8 additions and 13 deletions

View File

@@ -52,7 +52,7 @@ abstract class EVP_Cipher_Operation extends EVPOperation, Crypto::KeyOperationIn
}
}
class EVP_Cipher_Call extends EVPOneShot, EVP_Cipher_Operation {
class EVP_Cipher_Call extends EVPOperation, EVP_Cipher_Operation {
EVP_Cipher_Call() { this.(Call).getTarget().getName() = "EVP_Cipher" }
override Expr getInputArg() { result = this.(Call).getArgument(2) }

View File

@@ -15,7 +15,7 @@ class EVP_Digest_Update_Call extends EVPUpdate {
}
//https://docs.openssl.org/3.0/man3/EVP_DigestInit/#synopsis
class EVP_Q_Digest_Operation extends EVPOneShot, Crypto::HashOperationInstance {
class EVP_Q_Digest_Operation extends EVPOperation, Crypto::HashOperationInstance {
EVP_Q_Digest_Operation() { this.(Call).getTarget().getName() = "EVP_Q_digest" }
override Expr getAlgorithmArg() { result = this.(Call).getArgument(1) }
@@ -31,15 +31,15 @@ class EVP_Q_Digest_Operation extends EVPOneShot, Crypto::HashOperationInstance {
override Expr getOutputArg() { result = this.(Call).getArgument(5) }
override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
result = EVPOneShot.super.getOutputArtifact()
result = EVPOperation.super.getOutputArtifact()
}
override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
result = EVPOneShot.super.getInputConsumer()
result = EVPOperation.super.getInputConsumer()
}
}
class EVP_Digest_Operation extends EVPOneShot, Crypto::HashOperationInstance {
class EVP_Digest_Operation extends EVPOperation, Crypto::HashOperationInstance {
EVP_Digest_Operation() { this.(Call).getTarget().getName() = "EVP_Digest" }
// There is no context argument for this function
@@ -58,11 +58,11 @@ class EVP_Digest_Operation extends EVPOneShot, Crypto::HashOperationInstance {
override Expr getOutputArg() { result = this.(Call).getArgument(2) }
override Crypto::ArtifactOutputDataFlowNode getOutputArtifact() {
result = EVPOneShot.super.getOutputArtifact()
result = EVPOperation.super.getOutputArtifact()
}
override Crypto::ConsumerInputDataFlowNode getInputConsumer() {
result = EVPOneShot.super.getInputConsumer()
result = EVPOperation.super.getInputConsumer()
}
}

View File

@@ -93,7 +93,7 @@ private module AlgGetterToAlgConsumerFlow = DataFlow::Global<AlgGetterToAlgConsu
/**
* The base class for all operations of the EVP API.
* Currently final calls and one-shot calls are implemented.
* This captures one-shot APIs (with and without an initilizer call) and final calls.
* Provides some default methods for Crypto::KeyOperationInstance class
*/
abstract class EVPOperation extends OpenSSLOperation {
@@ -162,8 +162,3 @@ abstract class EVPFinal extends EVPOperation {
*/
override Expr getOutputArg() { result = this.getUpdateCalls().getOutputArg() }
}
/**
* One-shot calls of EVP API.
*/
abstract class EVPOneShot extends EVPOperation { }