From 09a775e13a5d3b89c365ade6ef35a5a791c0ab7d Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Wed, 26 Sep 2007 13:46:45 +0000 Subject: #948 Fix passphrase encoding for some passphrases (bertf) --- diff --git a/NEWS b/NEWS index dcbfc8e..d9fa7e7 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +* #948 Fix passphrase encoding for some passphrases. (bertf) * #948 Accept ascii passphrases for WEP networks. '$:1a2b3c4d' for hex keys, 's:my passphrase' for 5 or 13 characters ascii passphrases, or just the plain key for ascii passphrases of any other length. (tomeu) diff --git a/shell/hardware/keydialog.py b/shell/hardware/keydialog.py index 6c66006..6b5976c 100644 --- a/shell/hardware/keydialog.py +++ b/shell/hardware/keydialog.py @@ -67,7 +67,7 @@ def string_is_ascii(string): def string_to_hex(passphrase): key = '' for c in passphrase: - key += hex(ord(c))[2:] + key += '%02x' % ord(c) return key def hash_passphrase(passphrase): -- cgit v0.9.1