summaryrefslogtreecommitdiffstats
path: root/remoting/host/service_urls.cc
diff options
context:
space:
mode:
authorrmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-23 00:44:01 +0000
committerrmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-23 00:44:01 +0000
commitd49045b85d84151fbb628f5fc44d5778fca2a73b (patch)
tree8f09d451ab307fce8b58048b7a5fb3df48c25114 /remoting/host/service_urls.cc
parent37a4a6131ae2bab4e58f63bffb88341412fe5534 (diff)
downloadchromium_src-d49045b85d84151fbb628f5fc44d5778fca2a73b.zip
chromium_src-d49045b85d84151fbb628f5fc44d5778fca2a73b.tar.gz
chromium_src-d49045b85d84151fbb628f5fc44d5778fca2a73b.tar.bz2
Add command line switch to ignore certificate requests to our host apps.
URLFetcher's default behavior is to cancel connection when it's presented with a certificate request. This flag allows it to try to connect with a NULL certificate instead. This allows them to connect to servers that have optional SSL client authentication, like test servers. As with other test server flags, it's only enabled in debug builds. For more details, see the CL the flag was introduced on: https://chromiumcodereview.appspot.com/12095075/ BUG= Review URL: https://chromiumcodereview.appspot.com/12320070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/service_urls.cc')
-rw-r--r--remoting/host/service_urls.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/remoting/host/service_urls.cc b/remoting/host/service_urls.cc
index ea1d448..6a525e2 100644
--- a/remoting/host/service_urls.cc
+++ b/remoting/host/service_urls.cc
@@ -20,6 +20,8 @@ const char kDirectoryBaseUrlSwitch[] = "directory-base-url";
const char kXmppServerAddressSwitch[] = "xmpp-server-address";
const char kXmppServerDisableTlsSwitch[] = "disable-xmpp-server-tls";
const char kDirectoryBotJidSwitch[] = "directory-bot-jid";
+const char kIgnoreUrlFetcherCertRequestsSwitch[] =
+ "ignore-urlfetcher-cert-requests";
// Non-configurable service paths.
const char kDirectoryHostsSuffix[] = "/@me/hosts/";
@@ -32,7 +34,8 @@ ServiceUrls::ServiceUrls()
: directory_base_url_(kDirectoryBaseUrl),
xmpp_server_address_(kXmppServerAddress),
xmpp_server_use_tls_(kXmppServerUseTls),
- directory_bot_jid_(kDirectoryBotJid) {
+ directory_bot_jid_(kDirectoryBotJid),
+ ignore_urlfetcher_cert_requests_(false) {
#if !defined(NDEBUG)
// Allow debug builds to override urls via command line.
CommandLine* command_line = CommandLine::ForCurrentProcess();
@@ -49,6 +52,9 @@ ServiceUrls::ServiceUrls()
if (command_line->HasSwitch(kXmppServerDisableTlsSwitch)) {
xmpp_server_use_tls_ = false;
}
+ if (command_line->HasSwitch(kIgnoreUrlFetcherCertRequestsSwitch)) {
+ ignore_urlfetcher_cert_requests_ = true;
+ }
if (command_line->HasSwitch(kDirectoryBotJidSwitch)) {
directory_bot_jid_ = command_line->GetSwitchValueASCII(
kDirectoryBotJidSwitch);
@@ -83,4 +89,8 @@ const std::string& ServiceUrls::directory_bot_jid() const {
return directory_bot_jid_;
}
+bool ServiceUrls::ignore_urlfetcher_cert_requests() const {
+ return ignore_urlfetcher_cert_requests_;
+}
+
} // namespace remoting