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

Unified Diff: net/url_request/url_request.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 | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index c2d0f4f6d6c6b85e69f9041f969dfcabf0bb6ef2..17ff311275f3a2cfb9e8714512d527ab33a8fe1b 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -8,6 +8,7 @@
#include "base/message_loop.h"
#include "base/metrics/stats_counters.h"
#include "base/singleton.h"
+#include "base/utf_string_conversions.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
@@ -70,6 +71,11 @@ void URLRequest::Delegate::OnAuthRequired(URLRequest* request,
request->CancelAuth();
}
+void URLRequest::Delegate::OnTLSLoginRequired(
+ URLRequest* request,
+ net::AuthChallengeInfo* login_request_info) {
+}
+
void URLRequest::Delegate::OnCertificateRequested(
URLRequest* request,
net::SSLCertRequestInfo* cert_request_info) {
@@ -105,7 +111,8 @@ URLRequest::URLRequest(const GURL& url, Delegate* delegate)
enable_profiling_(false),
redirect_limit_(kMaxRedirects),
final_upload_progress_(0),
- priority_(net::LOWEST) {
+ priority_(net::LOWEST),
+ tls_login_auth_data_(new AuthData()) {
SIMPLE_STATS_COUNTER("URLRequestCount");
// Sanity check out environment.
@@ -504,6 +511,31 @@ void URLRequest::ContinueWithCertificate(net::X509Certificate* client_cert) {
job_->ContinueWithCertificate(client_cert);
}
+void URLRequest::SetTLSLogin(const string16& username,
+ const string16& password) {
+ tls_login_auth_data_->username = username;
+ tls_login_auth_data_->password = password;
+ tls_login_auth_data_->state = AUTH_STATE_HAVE_AUTH;
+}
+
+AuthData* URLRequest::GetTLSLoginAuthData() {
+ return tls_login_auth_data_.get();
+}
+
+void URLRequest::CancelTLSLogin() {
+ DCHECK(job_);
+
+ job_->CancelTLSLogin();
+}
+
+void URLRequest::ContinueWithTLSLogin() {
+ DCHECK(job_);
+ DCHECK(tls_login_auth_data_->state == AUTH_STATE_HAVE_AUTH);
+ DCHECK(!tls_login_auth_data_->username.empty());
+
+ job_->ContinueWithTLSLogin();
+}
+
void URLRequest::ContinueDespiteLastError() {
DCHECK(job_);
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_http_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698