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

Unified Diff: chrome/browser/ssl/ssl_manager.cc

Issue 6804032: Add TLS-SRP (RFC 5054) support Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove "httpsv" scheme, minor NSS/OpenSSL changes Created 9 years, 8 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 | « chrome/browser/ssl/ssl_manager.h ('k') | chrome/browser/ssl/ssl_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_manager.cc
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 7d662c0cafd987343103f3cdcd425aa2f952875b..b50519f4c042e04d3b764b5a49eee9f9b0a2a8c8 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -61,12 +61,14 @@ void SSLManager::NotifySSLInternalStateChanged() {
std::string SSLManager::SerializeSecurityInfo(int cert_id,
int cert_status,
int security_bits,
- int ssl_connection_status) {
+ int ssl_connection_status,
+ string16 tls_username) {
Pickle pickle;
pickle.WriteInt(cert_id);
pickle.WriteInt(cert_status);
pickle.WriteInt(security_bits);
pickle.WriteInt(ssl_connection_status);
+ pickle.WriteString16(tls_username);
return std::string(static_cast<const char*>(pickle.data()), pickle.size());
}
@@ -75,8 +77,10 @@ bool SSLManager::DeserializeSecurityInfo(const std::string& state,
int* cert_id,
int* cert_status,
int* security_bits,
- int* ssl_connection_status) {
- DCHECK(cert_id && cert_status && security_bits && ssl_connection_status);
+ int* ssl_connection_status,
+ string16* tls_username) {
+ DCHECK(cert_id && cert_status && security_bits && ssl_connection_status &&
+ tls_username);
if (state.empty()) {
// No SSL used.
*cert_id = 0;
@@ -84,6 +88,7 @@ bool SSLManager::DeserializeSecurityInfo(const std::string& state,
*cert_status = 0;
*security_bits = -1;
*ssl_connection_status = 0;
+ tls_username->clear();
return false;
}
@@ -92,7 +97,8 @@ bool SSLManager::DeserializeSecurityInfo(const std::string& state,
return pickle.ReadInt(&iter, cert_id) &&
pickle.ReadInt(&iter, cert_status) &&
pickle.ReadInt(&iter, security_bits) &&
- pickle.ReadInt(&iter, ssl_connection_status);
+ pickle.ReadInt(&iter, ssl_connection_status) &&
+ pickle.ReadString16(&iter, tls_username);
}
// static
@@ -144,11 +150,13 @@ void SSLManager::DidCommitProvisionalLoad(
// Decode the security details.
int ssl_cert_id, ssl_cert_status, ssl_security_bits,
ssl_connection_status;
+ string16 tls_username;
DeserializeSecurityInfo(details->serialized_security_info,
&ssl_cert_id,
&ssl_cert_status,
&ssl_security_bits,
- &ssl_connection_status);
+ &ssl_connection_status,
+ &tls_username);
// We may not have an entry if this is a navigation to an initial blank
// page. Reset the SSL information and add the new data we have.
@@ -157,6 +165,7 @@ void SSLManager::DidCommitProvisionalLoad(
entry->ssl().set_cert_status(ssl_cert_status);
entry->ssl().set_security_bits(ssl_security_bits);
entry->ssl().set_connection_status(ssl_connection_status);
+ entry->ssl().set_tls_username(tls_username);
}
}
@@ -218,7 +227,8 @@ void SSLManager::DidLoadFromMemoryCache(LoadFromMemoryCacheDetails* details) {
details->main_frame_origin(),
details->pid(),
details->ssl_cert_id(),
- details->ssl_cert_status()));
+ details->ssl_cert_status(),
+ details->tls_username()));
// Simulate loading this resource through the usual path.
policy()->OnRequestStarted(info.get());
@@ -232,7 +242,8 @@ void SSLManager::DidStartResourceResponse(ResourceRequestDetails* details) {
details->main_frame_origin(),
details->origin_child_id(),
details->ssl_cert_id(),
- details->ssl_cert_status()));
+ details->ssl_cert_status(),
+ details->tls_username()));
// Notify our policy that we started a resource request. Ideally, the
// policy should have the ability to cancel the request, but we can't do
« no previous file with comments | « chrome/browser/ssl/ssl_manager.h ('k') | chrome/browser/ssl/ssl_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698