-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Crypto: Improve literal filtering for OpenSSL for algorithms and generic sources #19553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a36fd2c
Crypto: Advanced literal filtering for OpenSSL, used for both unknown…
bdrodes 100045d
Crypto: optimizing out the "getPossibleNidFromLiteral" predicate, and…
bdrodes 09170e5
Crypto: Making generic literal filter more explicit that it is for fi…
bdrodes a5b57d3
Merge branch 'main' into generic_constant_filtering
bdrodes 570fdeb
Crypto: Code Cleanup (+1 squashed commits)
bdrodes ca1d4e2
Crypto: Separating out an IntLiteral class so it is clearer that some…
bdrodes 28f4824
Crypto: Adding signature constant support, and fixing key exchange an…
bdrodes 007683f
Crypto: Simplifying constant comparisons.
bdrodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,15 @@ | |
} | ||
} | ||
|
||
class KnownOpenSSLSignatureAlgorithmConstant extends KnownOpenSSLAlgorithmConstant { | ||
Check warningCode scanning / CodeQL Acronyms should be PascalCase/camelCase. Warning
Acronyms in KnownOpenSSLSignatureAlgorithmConstant should be PascalCase/camelCase.
|
||
string algType; | ||
|
||
|
||
KnownOpenSSLSignatureAlgorithmConstant() { | ||
resolveAlgorithmFromExpr(this, _, algType) and | ||
algType.matches("SIGNATURE") | ||
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Show resolved
Hide resolved
|
||
} | ||
} | ||
|
||
/** | ||
* Resolves a call to a 'direct algorithm getter', e.g., EVP_MD5() | ||
* This approach to fetching algorithms was used in OpenSSL 1.0.2. | ||
|
@@ -263,8 +272,12 @@ | |
or | ||
name = "ed25519" and nid = 1087 and normalized = "ED25519" and algType = "ELLIPTIC_CURVE" | ||
or | ||
name = "ed25519" and nid = 1087 and normalized = "ED25519" and algType = "SIGNATURE" | ||
or | ||
name = "ed448" and nid = 1088 and normalized = "ED448" and algType = "ELLIPTIC_CURVE" | ||
or | ||
name = "ed448" and nid = 1088 and normalized = "ED448" and algType = "SIGNATURE" | ||
or | ||
name = "md2" and nid = 3 and normalized = "MD2" and algType = "HASH" | ||
or | ||
name = "sha" and nid = 41 and normalized = "SHA" and algType = "HASH" | ||
|
@@ -1684,8 +1697,12 @@ | |
or | ||
name = "x448" and nid = 1035 and normalized = "X448" and algType = "ELLIPTIC_CURVE" | ||
or | ||
name = "x448" and nid = 1035 and normalized = "X448" and algType = "KEY_EXCHANGE" | ||
or | ||
name = "x25519" and nid = 1034 and normalized = "X25519" and algType = "ELLIPTIC_CURVE" | ||
or | ||
name = "x25519" and nid = 1034 and normalized = "X25519" and algType = "KEY_EXCHANGE" | ||
or | ||
name = "authecdsa" and nid = 1047 and normalized = "ECDSA" and algType = "SIGNATURE" | ||
or | ||
name = "authgost01" and nid = 1050 and normalized = "GOST" and algType = "SYMMETRIC_ENCRYPTION" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.