Browse Source

Some ciphers params are wrong

aeris 1 year ago
parent
commit
f37e6fd2f1
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      lib/cryptcheck/tls/cipher.rb

+ 8
- 8
lib/cryptcheck/tls/cipher.rb View File

@@ -156,7 +156,7 @@ module CryptCheck
156 156
 				context         = OpenSSL::SSL::SSLContext.new method
157 157
 				context.ciphers = cipher_suite
158 158
 				ciphers         = context.ciphers.collect { |c| self.new method, c }
159
-				self.sort ciphers
159
+				ciphers.sort
160 160
 			end
161 161
 
162 162
 			def kex
@@ -190,27 +190,27 @@ module CryptCheck
190 190
 			def encryption
191 191
 				case
192 192
 					when chacha20?
193
-						[:chacha20, nil, 128, self.mode]
193
+						[:chacha20, 256, :stream, self.mode]
194 194
 					when aes128?
195 195
 						[:aes, 128, 128, self.mode]
196 196
 					when aes256?
197
-						[:aes, 128, 128, self.mode]
197
+						[:aes, 256, 256, self.mode]
198 198
 					when camellia?
199 199
 						[:camellia, 128, 128, self.mode]
200 200
 					when seed?
201 201
 						[:seed, 128, 128, self.mode]
202 202
 					when idea?
203
-						[:idea, 64, 128, self.mode]
203
+						[:idea, 128, 64, self.mode]
204 204
 					when des3?
205
-						[:'3des', 64, 112, self.mode]
205
+						[:'3des', 112, 64, self.mode]
206 206
 					when des?
207
-						[:des, 64, 56, self.mode]
207
+						[:des, 56, 64, self.mode]
208 208
 					when rc4?
209
-						[:rc4, nil, nil, self.mode]
209
+						[:rc4, 128, :stream, self.mode]
210 210
 					when rc2?
211 211
 						[:rc2, 64, 64, self.mode]
212 212
 					when null?
213
-						[nil, nil, nil, nil]
213
+						[nil, 0, 0, nil]
214 214
 				end
215 215
 			end
216 216
 

Loading…
Cancel
Save