@@ -109,25 +109,25 @@ string getAnInsecureHashAlgorithmName() {
109109 result = "MD5"
110110}
111111
112- private string rankedAlgorithmBlacklist ( int i ) {
112+ private string rankedInsecureAlgorithm ( int i ) {
113113 // In this case we know these are being used for encryption, so we want to match
114114 // 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 ( ) )
116117}
117118
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 )
120121 or
121- result = rankedAlgorithmBlacklist ( i ) + "|" + algorithmBlacklistString ( i - 1 )
122+ result = rankedInsecureAlgorithm ( i ) + "|" + insecureAlgorithmString ( i - 1 )
122123}
123124
124125/**
125126 * Gets the regular expression used for matching strings that look like they
126127 * contain an algorithm that is known to be insecure.
127128 */
128129string getInsecureAlgorithmRegex ( ) {
129- result =
130- algorithmRegex ( algorithmBlacklistString ( max ( int i | exists ( rankedAlgorithmBlacklist ( i ) ) ) ) )
130+ result = algorithmRegex ( insecureAlgorithmString ( max ( int i | exists ( rankedInsecureAlgorithm ( i ) ) ) ) )
131131}
132132
133133/**
@@ -144,21 +144,20 @@ string getASecureAlgorithmName() {
144144 result = "ECIES"
145145}
146146
147- private string rankedAlgorithmWhitelist ( int i ) { result = rank [ i ] ( getASecureAlgorithmName ( ) ) }
147+ private string rankedSecureAlgorithm ( int i ) { result = rank [ i ] ( getASecureAlgorithmName ( ) ) }
148148
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 )
151151 or
152- result = rankedAlgorithmWhitelist ( i ) + "|" + algorithmWhitelistString ( i - 1 )
152+ result = rankedSecureAlgorithm ( i ) + "|" + secureAlgorithmString ( i - 1 )
153153}
154154
155155/**
156156 * Gets a regular expression for matching strings that look like they
157157 * contain an algorithm that is known to be secure.
158158 */
159159string getSecureAlgorithmRegex ( ) {
160- result =
161- algorithmRegex ( algorithmWhitelistString ( max ( int i | exists ( rankedAlgorithmWhitelist ( i ) ) ) ) )
160+ result = algorithmRegex ( secureAlgorithmString ( max ( int i | exists ( rankedSecureAlgorithm ( i ) ) ) ) )
162161}
163162
164163/**
0 commit comments