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

Unified Diff: chrome/browser/ui/login/login_prompt.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/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/toolbar/toolbar_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/login/login_prompt.cc
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
index 380f7b559a9229350334e4c99bc899b83591010f..f3b7bc61aa7d028f1f771642574a47eddc321af2 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -350,7 +350,14 @@ void LoginHandler::SetAuthDeferred(const std::wstring& username,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (request_) {
- request_->SetAuth(WideToUTF16Hack(username), WideToUTF16Hack(password));
+ if (auth_info_->over_protocol == net::AUTH_OVER_TLS) {
+ DCHECK_EQ(ASCIIToWide(net::kTLSSRPScheme), auth_info_->scheme);
+ request_->SetTLSLogin(WideToUTF16Hack(username),
+ WideToUTF16Hack(password));
+ request_->ContinueWithTLSLogin();
+ } else {
+ request_->SetAuth(WideToUTF16Hack(username), WideToUTF16Hack(password));
+ }
ResetLoginHandlerForRequest(request_);
}
}
@@ -360,8 +367,14 @@ void LoginHandler::CancelAuthDeferred() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (request_) {
- request_->CancelAuth();
- // Verify that CancelAuth doesn't destroy the request via our delegate.
+ if (auth_info_->over_protocol == net::AUTH_OVER_TLS) {
+ DCHECK_EQ(ASCIIToWide(net::kTLSSRPScheme), auth_info_->scheme);
+ request_->CancelTLSLogin();
+ } else {
+ request_->CancelAuth();
+ }
+ // Verify that CancelAuth/CancelTLSLogin doesn't destroy the request via
+ // our delegate.
DCHECK(request_ != NULL);
ResetLoginHandlerForRequest(request_);
}
@@ -435,6 +448,8 @@ class LoginDialogTask : public Task {
dialog_form.scheme = PasswordForm::SCHEME_BASIC;
} else if (LowerCaseEqualsASCII(auth_info_->scheme, "digest")) {
dialog_form.scheme = PasswordForm::SCHEME_DIGEST;
+ } else if (LowerCaseEqualsASCII(auth_info_->scheme, net::kTLSSRPScheme)) {
+ dialog_form.scheme = PasswordForm::SCHEME_TLS_SRP;
} else {
dialog_form.scheme = PasswordForm::SCHEME_OTHER;
}
@@ -446,6 +461,7 @@ class LoginDialogTask : public Task {
origin = std::string("http://") + origin;
dialog_form.origin = GURL(origin);
} else if (net::GetHostAndPort(request_url_) != host_and_port) {
+ LOG(INFO) << net::GetHostAndPort(request_url_) << " vs " << host_and_port;
dialog_form.origin = GURL();
NOTREACHED(); // crbug.com/32718
} else {
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.cc ('k') | chrome/browser/ui/toolbar/toolbar_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698