OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/base/ssl_cipher_suite_names.h" | 5 #include "net/base/ssl_cipher_suite_names.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include "base/logging.h" | |
10 | 9 |
11 // Rather than storing the names of all the ciphersuites we eliminate the | 10 // Rather than storing the names of all the ciphersuites we eliminate the |
12 // redundancy and break each cipher suite into a key exchange method, cipher | 11 // redundancy and break each cipher suite into a key exchange method, cipher |
13 // and mac. For all the ciphersuites in the IANA registry, we extract each of | 12 // and mac. For all the ciphersuites in the IANA registry, we extract each of |
14 // those components from the name, number them and pack the result into a | 13 // those components from the name, number them and pack the result into a |
15 // 16-bit number thus: | 14 // 16-bit number thus: |
16 // (MSB to LSB) | 15 // (MSB to LSB) |
17 // <4 bits> unused | 16 // <4 bits> unused |
18 // <5 bits> key exchange | 17 // <5 bits> key exchange |
19 // <4 bits> cipher | 18 // <4 bits> cipher |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 } else if (compresssion == 1) { | 340 } else if (compresssion == 1) { |
342 *name = "DEFLATE"; | 341 *name = "DEFLATE"; |
343 } else if (compresssion == 64) { | 342 } else if (compresssion == 64) { |
344 *name = "LZS"; | 343 *name = "LZS"; |
345 } else { | 344 } else { |
346 *name = "???"; | 345 *name = "???"; |
347 } | 346 } |
348 } | 347 } |
349 | 348 |
350 } // namespace net | 349 } // namespace net |
OLD | NEW |