mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Crypto: Update model to have a mac operation instance that extends the signature or mac operation instance.
This commit is contained in:
@@ -690,23 +690,6 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
|
||||
predicate shouldHavePaddingScheme() { any() }
|
||||
}
|
||||
|
||||
// abstract class SignatureOrMacAlgorithmInstance extends KeyOperationAlgorithmInstance {
|
||||
// SignatureOrMacAlgorithmInstance() {
|
||||
// this.getAlgorithmType() = KeyOpAlg::TSignature(_)
|
||||
// or
|
||||
// this.getAlgorithmType() = KeyOpAlg::TMac(_)
|
||||
// }
|
||||
// override predicate shouldHaveModeOfOperation() { none() }
|
||||
// /**
|
||||
// * Gets the hash algorithm used by this signature algorithm.
|
||||
// */
|
||||
// abstract AlgorithmValueConsumer getHashAlgorithmValueConsumer();
|
||||
// }
|
||||
// abstract class SignatureAlgorithmInstance extends SignatureOrMacAlgorithmInstance {
|
||||
// SignatureAlgorithmInstance() { this.getAlgorithmType() = KeyOpAlg::TSignature(_) }
|
||||
// }
|
||||
abstract class MacOperationInstance extends KeyOperationAlgorithmInstance { }
|
||||
|
||||
abstract class HmacAlgorithmInstance extends KeyOperationAlgorithmInstance {
|
||||
HmacAlgorithmInstance() { this.getAlgorithmType() = KeyOpAlg::TMac(KeyOpAlg::HMAC()) }
|
||||
|
||||
@@ -832,6 +815,8 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
|
||||
abstract ConsumerInputDataFlowNode getSignatureConsumer();
|
||||
}
|
||||
|
||||
abstract class MacOperationInstance extends SignatureOrMacOperationInstance { }
|
||||
|
||||
abstract class EllipticCurveInstance extends AlgorithmInstance {
|
||||
/**
|
||||
* Gets the isolated name as it appears in source
|
||||
|
||||
Reference in New Issue
Block a user