Skip to content

Commit af82da5

Browse files
authored
Merge pull request #20350 from michaelnebel/cpp/ql4qlexperimental
C++: Fix some Ql4Ql violations (crypto).
2 parents 64d68fe + 462d639 commit af82da5

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

cpp/ql/lib/experimental/cryptography/CryptoArtifact.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ abstract class CryptographicAlgorithm extends CryptographicArtifact {
127127
/**
128128
* Normalizes a raw name into a normalized name as found in `CryptoAlgorithmNames.qll`.
129129
* Subclassess should override for more api-specific normalization.
130-
* By deafult, converts a raw name to upper-case with no hyphen, underscore, hash, or space.
130+
* By default, converts a raw name to upper-case with no hyphen, underscore, hash, or space.
131131
*/
132132
bindingset[s]
133133
string normalizeName(string s) {

cpp/ql/lib/experimental/cryptography/modules/OpenSSL.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,14 +652,14 @@ module KeyGeneration {
652652
* Trace from EVP_PKEY_CTX* at algorithm sink to keygen,
653653
* users can then extrapolatae the matching algorithm from the alg sink to the keygen
654654
*/
655-
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize implements DataFlow::ConfigSig {
655+
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSizeConfig implements DataFlow::ConfigSig {
656656
predicate isSource(DataFlow::Node source) { isEVP_PKEY_CTX_Source(source, _) }
657657

658658
predicate isSink(DataFlow::Node sink) { isKeyGen_EVP_PKEY_CTX_Sink(sink, _) }
659659
}
660660

661661
module EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize_Flow =
662-
DataFlow::Global<EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSize>;
662+
DataFlow::Global<EVP_PKEY_CTX_Ptr_Source_to_KeyGenOperationWithNoSizeConfig>;
663663

664664
/**
665665
* UNKNOWN key sizes to general purpose key generation functions (i.e., that take in no key size and assume

cpp/ql/lib/experimental/cryptography/utils/OpenSSL/CryptoFunction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private string privateNormalizeFunctionName(Function f, string algType) {
5959
*
6060
* The predicate attempts to restrict normalization to what looks like an openssl
6161
* library by looking for functions only in an openssl path (see `isPossibleOpenSSLFunction`).
62-
* This may give false postive functions if a directory erronously appears to be openssl;
62+
* This may give false positive functions if a directory erronously appears to be openssl;
6363
* however, we take the stance that if a function
6464
* exists strongly mapping to a known function name in a directory such as these,
6565
* regardless of whether its actually a part of openSSL or not, we will analyze it as though it were.

cpp/ql/lib/experimental/cryptography/utils/OpenSSL/DataBuilders.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ private string privateNormalizeFunctionName(Function f, string algType) {
4949
*
5050
* The predicate attempts to restrict normalization to what looks like an openssl
5151
* library by looking for functions only in an openssl path (see `isPossibleOpenSSLFunction`).
52-
* This may give false postive functions if a directory erronously appears to be openssl;
52+
* This may give false positive functions if a directory erronously appears to be openssl;
5353
* however, we take the stance that if a function
5454
* exists strongly mapping to a known function name in a directory such as these,
5555
* regardless of whether its actually a part of openSSL or not, we will analyze it as though it were.

cpp/ql/lib/experimental/cryptography/utils/OpenSSL/PassthroughFunction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ predicate knownPassthroughFunction(Function f, int inInd, int outInd) {
3131

3232
/**
3333
* `c` is a call to a function that preserves the algorithm but changes its form.
34-
* `onExpr` is the input argument passing through to, `outExpr` is the next expression in a dataflow step associated with `c`
34+
* `inExpr` is the input argument passing through to, `outExpr` is the next expression in a dataflow step associated with `c`
3535
*/
3636
predicate knownPassthoughCall(Call c, Expr inExpr, Expr outExpr) {
3737
exists(int inInd, int outInd |

0 commit comments

Comments
 (0)