Crypto: Fix further acronym casing and remove unused field · trailofbits/codeql@8e6031d · GitHub
Skip to content

Commit 8e6031d

Browse files
committed
Crypto: Fix further acronym casing and remove unused field
1 parent b809750 commit 8e6031d

5 files changed

Lines changed: 22 additions & 24 deletions

File tree

‎cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/CipherAlgorithmInstance.qll‎

Lines changed: 2 additions & 2 deletions

‎cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/HashAlgorithmInstance.qll‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ predicate knownOpenSslConstantToHashFamilyType(
1515
or
1616
name = "BLAKE2S" and type instanceof Crypto::BLAKE2S
1717
or
18-
name.matches("GOST%") and type instanceof Crypto::GOSTHash
18+
name.matches("GOST%") and type instanceof Crypto::GOST_HASH
1919
or
2020
name = "MD2" and type instanceof Crypto::MD2
2121
or

‎cpp/ql/lib/experimental/quantum/OpenSSL/AlgorithmInstances/PaddingAlgorithmInstance.qll‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ predicate knownOpenSslConstantToPaddingFamilyType(
4040
or
4141
name = "PKCS7" and type = KeyOpAlg::PKCS7()
4242
or
43-
name = "PKCS1V15" and type = KeyOpAlg::PKCS1_v1_5()
43+
name = "PKCS1V15" and type = KeyOpAlg::PKCS1_V1_5()
4444
)
4545
)
4646
}
@@ -100,7 +100,7 @@ class KnownOpenSslPaddingConstantAlgorithmInstance extends OpenSslAlgorithmInsta
100100
override OpenSslAlgorithmValueConsumer getAvc() { result = getterCall }
101101

102102
KeyOpAlg::PaddingSchemeType getKnownPaddingType() {
103-
this.(Literal).getValue().toInt() in [1, 7, 8] and result = KeyOpAlg::PKCS1_v1_5()
103+
this.(Literal).getValue().toInt() in [1, 7, 8] and result = KeyOpAlg::PKCS1_V1_5()
104104
or
105105
this.(Literal).getValue().toInt() = 3 and result = KeyOpAlg::NoPadding()
106106
or

‎java/ql/lib/experimental/quantum/JCA.qll‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ module JCAModel {
180180
type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::DES())
181181
or
182182
upper = "TRIPLEDES" and
183-
type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::TripleDES())
183+
type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::TRIPLE_DES())
184184
or
185185
upper = "IDEA" and
186186
type = KeyOpAlg::TSymmetricCipher(KeyOpAlg::IDEA())
@@ -1522,9 +1522,7 @@ module JCAModel {
15221522
}
15231523

15241524
class MacGetInstanceAlgorithmValueConsumer extends Crypto::AlgorithmValueConsumer {
1525-
MacGetInstanceCall call;
1526-
1527-
MacGetInstanceAlgorithmValueConsumer() { this = call.getAlgorithmArg() }
1525+
MacGetInstanceAlgorithmValueConsumer() { this = any(MacGetInstanceCall c).getAlgorithmArg() }
15281526

15291527
override Crypto::ConsumerInputDataFlowNode getInputNode() { result.asExpr() = this }
15301528

‎shared/quantum/codeql/quantum/experimental/Standardization.qll‎

Lines changed: 15 additions & 15 deletions

0 commit comments

Comments
 (0)