Skip to content

Commit 65f7474

Browse files
Jami CogswellJami Cogswell
authored andcommitted
simplify algorithm.matches
1 parent 1bfdfc9 commit 65f7474

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/lib/semmle/code/java/security/InsufficientKeySize.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ private module Asymmetric {
9595
algorithm.matches("sec%") and // specification such as "secp256r1"
9696
result = algorithm.regexpCapture("sec[p|t](\\d+)[a-zA-Z].*", 1).toInt()
9797
or
98-
algorithm.matches("X9.62%") and //specification such as "X9.62 prime192v2"
98+
algorithm.matches("X9.62%") and // specification such as "X9.62 prime192v2"
9999
result = algorithm.regexpCapture("X9\\.62 .*[a-zA-Z](\\d+)[a-zA-Z].*", 1).toInt()
100100
or
101-
(algorithm.matches("prime%") or algorithm.matches("c2tnb%")) and //specification such as "prime192v2"
101+
algorithm.matches(["prime%", "c2tnb%"]) and // specification such as "prime192v2"
102102
result = algorithm.regexpCapture(".*[a-zA-Z](\\d+)[a-zA-Z].*", 1).toInt()
103103
}
104104

0 commit comments

Comments
 (0)