Chromium Code Reviews| Index: net/base/ssl_info.h |
| diff --git a/net/base/ssl_info.h b/net/base/ssl_info.h |
| index 203b6de0d8b1d04bfcfa31888dd510a68a801d69..6e4f50a6fe4120b90661f650517cbf7391913447 100644 |
| --- a/net/base/ssl_info.h |
| +++ b/net/base/ssl_info.h |
| @@ -14,12 +14,15 @@ namespace net { |
| // This is really a struct. All members are public. |
| class SSLInfo { |
| public: |
| - SSLInfo() : cert_status(0), security_bits(-1) { } |
| + SSLInfo() : cert_status(0), security_bits(-1), |
| + next_proto_status(kNextProtoUnsupported) { } |
| void Reset() { |
| cert = NULL; |
| security_bits = -1; |
| cert_status = 0; |
| + next_proto.clear(); |
| + next_proto_status = kNextProtoUnsupported; |
| } |
| bool is_valid() const { return cert != NULL; } |
| @@ -41,6 +44,19 @@ class SSLInfo { |
| // 0 means the connection is not encrypted. |
| // -1 means the security strength is unknown. |
| int security_bits; |
| + |
| + // Next Protocol Negotiation (NPN) allows a TLS client and server to come to |
| + // an agreement about the application level protocol to speak over a |
| + // connection. See also the next_protos field in SSLConfig. |
| + enum NextProtoStatus { |
|
willchan no longer on Chromium
2009/11/25 19:48:13
enums should go first in the class definition:
htt
agl
2009/11/30 20:24:53
Done.
|
| + kNextProtoUnsupported = 0, // The server doesn't support NPN. |
| + kNextProtoNegotiated = 1, // We agreed on a protocol, see next_proto |
| + kNextProtoNoOverlap = 2, // No protocols in common. We requested |
| + // |next_proto|. |
| + }; |
| + |
| + NextProtoStatus next_proto_status; // One of kNextProto* |
| + std::string next_proto; // The negotiated protocol, if any. |
|
willchan no longer on Chromium
2009/11/25 19:48:13
You should #include <string> for this.
agl
2009/11/30 20:24:53
Done.
|
| }; |
| } // namespace net |