@@ -109,25 +109,25 @@ string getAnInsecureHashAlgorithmName() {
109
109
result = "MD5"
110
110
}
111
111
112
- private string rankedAlgorithmBlacklist ( int i ) {
112
+ private string rankedInsecureAlgorithm ( int i ) {
113
113
// In this case we know these are being used for encryption, so we want to match
114
114
// weak hash algorithms too.
115
- result = rank [ i ] ( string s | s = getAnInsecureAlgorithmName ( ) or s = getAnInsecureHashAlgorithmName ( ) )
115
+ result =
116
+ rank [ i ] ( string s | s = getAnInsecureAlgorithmName ( ) or s = getAnInsecureHashAlgorithmName ( ) )
116
117
}
117
118
118
- private string algorithmBlacklistString ( int i ) {
119
- i = 1 and result = rankedAlgorithmBlacklist ( i )
119
+ private string insecureAlgorithmString ( int i ) {
120
+ i = 1 and result = rankedInsecureAlgorithm ( i )
120
121
or
121
- result = rankedAlgorithmBlacklist ( i ) + "|" + algorithmBlacklistString ( i - 1 )
122
+ result = rankedInsecureAlgorithm ( i ) + "|" + insecureAlgorithmString ( i - 1 )
122
123
}
123
124
124
125
/**
125
126
* Gets the regular expression used for matching strings that look like they
126
127
* contain an algorithm that is known to be insecure.
127
128
*/
128
129
string getInsecureAlgorithmRegex ( ) {
129
- result =
130
- algorithmRegex ( algorithmBlacklistString ( max ( int i | exists ( rankedAlgorithmBlacklist ( i ) ) ) ) )
130
+ result = algorithmRegex ( insecureAlgorithmString ( max ( int i | exists ( rankedInsecureAlgorithm ( i ) ) ) ) )
131
131
}
132
132
133
133
/**
@@ -144,21 +144,20 @@ string getASecureAlgorithmName() {
144
144
result = "ECIES"
145
145
}
146
146
147
- private string rankedAlgorithmWhitelist ( int i ) { result = rank [ i ] ( getASecureAlgorithmName ( ) ) }
147
+ private string rankedSecureAlgorithm ( int i ) { result = rank [ i ] ( getASecureAlgorithmName ( ) ) }
148
148
149
- private string algorithmWhitelistString ( int i ) {
150
- i = 1 and result = rankedAlgorithmWhitelist ( i )
149
+ private string secureAlgorithmString ( int i ) {
150
+ i = 1 and result = rankedSecureAlgorithm ( i )
151
151
or
152
- result = rankedAlgorithmWhitelist ( i ) + "|" + algorithmWhitelistString ( i - 1 )
152
+ result = rankedSecureAlgorithm ( i ) + "|" + secureAlgorithmString ( i - 1 )
153
153
}
154
154
155
155
/**
156
156
* Gets a regular expression for matching strings that look like they
157
157
* contain an algorithm that is known to be secure.
158
158
*/
159
159
string getSecureAlgorithmRegex ( ) {
160
- result =
161
- algorithmRegex ( algorithmWhitelistString ( max ( int i | exists ( rankedAlgorithmWhitelist ( i ) ) ) ) )
160
+ result = algorithmRegex ( secureAlgorithmString ( max ( int i | exists ( rankedSecureAlgorithm ( i ) ) ) ) )
162
161
}
163
162
164
163
/**
0 commit comments