eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 58737e02d5886a18d36d0d4f3eddcd648b561ed9
parent 0b34371253767db7db314b57aa42bc1a0c4a1ce0
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date:   Sat, 15 Feb 2020 01:17:48 +0100

test: Handle missing agent calls in simple-agent

Handle RequestPrivateKeyPassphrase and RequestUserNameAndPassword

Diffstat:
Mtest/simple-agent | 35+++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+), 0 deletions(-)

diff --git a/test/simple-agent b/test/simple-agent @@ -36,6 +36,41 @@ class Agent(dbus.service.Object): return passphrase @dbus.service.method("net.connman.iwd.Agent", + in_signature='o', + out_signature='s') + def RequestPrivateKeyPassphrase(self, path): + print("RequestPrivateKeyPassphrase (%s)" % (path)) + + print("Service credentials requested, type cancel to cancel") + passphrase = input('Answer: ') + + if not passphrase or passphrase == 'cancel': + raise Canceled("canceled") + + print("returning (%s)" % (passphrase)) + return passphrase + + @dbus.service.method("net.connman.iwd.Agent", + in_signature='o', + out_signature='ss') + def RequestUserNameAndPassword(self, path): + print("RequestPrivateKeyPassphrase (%s)" % (path)) + + print("Service credentials requested, type cancel to cancel") + user = input('User name: ') + + if not user or user == 'cancel': + raise Canceled("canceled") + + passwd = input('User password: ') + + if not passwd or passwd == 'cancel': + raise Canceled("canceled") + + print("returning (%s, %s)" % (user, passwd)) + return (user, passwd) + + @dbus.service.method("net.connman.iwd.Agent", in_signature='s', out_signature='') def Cancel(self, reason): print("Cancel: " + reason)