Merge pull request #16482 from grakshith/rakshith/tune-java-crypto

Java: Add RSA/ECB/OEAP ciphers to the list of secure algorithms
This commit is contained in:
Tony Torralba
2024-06-10 17:27:35 +02:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ private class ShortStringLiteral extends StringLiteral {
class BrokenAlgoLiteral extends ShortStringLiteral {
BrokenAlgoLiteral() {
this.getValue().regexpMatch(getInsecureAlgorithmRegex()) and
// Exclude RSA/ECB/.* ciphers.
not this.getValue().regexpMatch("RSA/ECB.*") and
// Exclude German and French sentences.
not this.getValue().regexpMatch(".*\\p{IsLowercase} des \\p{IsLetter}.*")
}