summaryrefslogtreecommitdiffstats
path: root/remoting/tools/me2me_virtual_host.py
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-08 02:28:33 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-08 02:28:33 +0000
commit2f109dbaf81360bbcfba8a83dca670eafd8ceab1 (patch)
tree662fa5573bf388e35fe5996e87bdda3afbc6a549 /remoting/tools/me2me_virtual_host.py
parentaaed739338a58a762537dbb81f006e35c1439913 (diff)
downloadchromium_src-2f109dbaf81360bbcfba8a83dca670eafd8ceab1.zip
chromium_src-2f109dbaf81360bbcfba8a83dca670eafd8ceab1.tar.gz
chromium_src-2f109dbaf81360bbcfba8a83dca670eafd8ceab1.tar.bz2
Make Me2Me host and client auth behaviour match user expectations.
1. The virtual Me2Me host script now allows to set empty PIN. 2. Me2Me host now accept V1 auth iff PIN is empty. 3. Skip PIN prompt if client plugin doesn't support it. Review URL: http://codereview.chromium.org/9363002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools/me2me_virtual_host.py')
-rwxr-xr-xremoting/tools/me2me_virtual_host.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py
index 495aae6..b5ebaea 100755
--- a/remoting/tools/me2me_virtual_host.py
+++ b/remoting/tools/me2me_virtual_host.py
@@ -188,8 +188,17 @@ class Host:
logging.info("Done")
def ask_pin(self):
+ print \
+"""Chromoting host supports PIN-based authentication, but it doesn't
+work with Chrome 16 and Chrome 17 clients. Leave the PIN empty if you
+need to use Chrome 16 or Chrome 17 clients. If you only use Chrome 18
+or above, please set a non-empty PIN. You can change PIN later using
+-p flag."""
while 1:
pin = getpass.getpass("Host PIN: ")
+ if len(pin) == 0:
+ print "Using empty PIN"
+ break
if len(pin) < 4:
print "PIN must be at least 4 characters long."
continue
@@ -198,8 +207,11 @@ class Host:
print "PINs didn't match. Please try again."
continue
break
- self.host_secret_hash = "hmac:" + base64.b64encode(
- hmac.new(str(self.host_id), pin, hashlib.sha256).digest())
+ if pin == "":
+ self.host_secret_hash = "plain:"
+ else:
+ self.host_secret_hash = "hmac:" + base64.b64encode(
+ hmac.new(str(self.host_id), pin, hashlib.sha256).digest())
def is_pin_set(self):
return self.host_secret_hash