Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1269)

Unified Diff: content/common/ssl_status_serialization.cc

Issue 1313363003: Expose OpenSSL's key_exchange_info in the content API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Proper #ifdef fix Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/common/ssl_status_serialization_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/ssl_status_serialization.cc
diff --git a/content/common/ssl_status_serialization.cc b/content/common/ssl_status_serialization.cc
index 26cb1cdc00cc8e2aa6ac9551aa25e715ba453fc8..5800f265fb1e58f9a2a3edb16c2b649254d25d70 100644
--- a/content/common/ssl_status_serialization.cc
+++ b/content/common/ssl_status_serialization.cc
@@ -33,6 +33,7 @@ std::string SerializeSecurityInfo(const SSLStatus& ssl_status) {
pickle.WriteInt(ssl_status.cert_id);
pickle.WriteUInt32(ssl_status.cert_status);
pickle.WriteInt(ssl_status.security_bits);
+ pickle.WriteInt(ssl_status.key_exchange_info);
pickle.WriteInt(ssl_status.connection_status);
pickle.WriteInt(ssl_status.signed_certificate_timestamp_ids.size());
for (SignedCertificateTimestampIDStatusList::const_iterator iter =
@@ -59,6 +60,7 @@ bool DeserializeSecurityInfo(const std::string& state, SSLStatus* ssl_status) {
if (!iter.ReadInt(&security_style) || !iter.ReadInt(&ssl_status->cert_id) ||
!iter.ReadUInt32(&ssl_status->cert_status) ||
!iter.ReadInt(&ssl_status->security_bits) ||
+ !iter.ReadInt(&ssl_status->key_exchange_info) ||
!iter.ReadInt(&ssl_status->connection_status) ||
!iter.ReadInt(&num_scts_to_read)) {
*ssl_status = SSLStatus();
@@ -78,6 +80,12 @@ bool DeserializeSecurityInfo(const std::string& state, SSLStatus* ssl_status) {
return false;
}
+ // Sanity check |key_exchange_info|: 0 or greater.
+ if (ssl_status->key_exchange_info < 0) {
+ *ssl_status = SSLStatus();
+ return false;
+ }
+
for (; num_scts_to_read > 0; --num_scts_to_read) {
int id;
uint16 status;
« no previous file with comments | « content/browser/loader/resource_loader.cc ('k') | content/common/ssl_status_serialization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698