OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef NET_BASE_SSL_CONNECTION_STATUS_FLAGS_H_ | 5 #ifndef NET_SSL_SSL_CONNECTION_STATUS_FLAGS_H_ |
6 #define NET_BASE_SSL_CONNECTION_STATUS_FLAGS_H_ | 6 #define NET_SSL_SSL_CONNECTION_STATUS_FLAGS_H_ |
7 | 7 |
8 namespace net { | 8 namespace net { |
9 | 9 |
10 // Status flags for SSLInfo::connection_status. | 10 // Status flags for SSLInfo::connection_status. |
11 enum { | 11 enum { |
12 // The lower 16 bits are reserved for the TLS ciphersuite id. | 12 // The lower 16 bits are reserved for the TLS ciphersuite id. |
13 SSL_CONNECTION_CIPHERSUITE_SHIFT = 0, | 13 SSL_CONNECTION_CIPHERSUITE_SHIFT = 0, |
14 SSL_CONNECTION_CIPHERSUITE_MASK = 0xffff, | 14 SSL_CONNECTION_CIPHERSUITE_MASK = 0xffff, |
15 | 15 |
16 // The next two bits are reserved for the compression used. | 16 // The next two bits are reserved for the compression used. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 SSL_CONNECTION_CIPHERSUITE_MASK; | 53 SSL_CONNECTION_CIPHERSUITE_MASK; |
54 } | 54 } |
55 | 55 |
56 inline int SSLConnectionStatusToVersion(int connection_status) { | 56 inline int SSLConnectionStatusToVersion(int connection_status) { |
57 return (connection_status >> SSL_CONNECTION_VERSION_SHIFT) & | 57 return (connection_status >> SSL_CONNECTION_VERSION_SHIFT) & |
58 SSL_CONNECTION_VERSION_MASK; | 58 SSL_CONNECTION_VERSION_MASK; |
59 } | 59 } |
60 | 60 |
61 } // namespace net | 61 } // namespace net |
62 | 62 |
63 #endif // NET_BASE_SSL_CONNECTION_STATUS_FLAGS_H_ | 63 #endif // NET_SSL_SSL_CONNECTION_STATUS_FLAGS_H_ |
OLD | NEW |