class SFTPServer(service.MultiService):
def __init__(self, client, accountfile, accounturl,
sftp_portstr, pubkey_file, privkey_file):
+ precondition(isinstance(accountfile, unicode), accountfile)
+ precondition(isinstance(pubkey_file, unicode), pubkey_file)
+ precondition(isinstance(privkey_file, unicode), privkey_file)
service.MultiService.__init__(self)
r = Dispatcher(client)
# we could leave this anonymous, with just the /uri/CAP form
raise NeedRootcapLookupScheme("must provide an account file or URL")
- pubkey = keys.Key.fromFile(pubkey_file)
- privkey = keys.Key.fromFile(privkey_file)
+ pubkey = keys.Key.fromFile(pubkey_file.encode(get_filesystem_encoding()))
+ privkey = keys.Key.fromFile(privkey_file.encode(get_filesystem_encoding()))
class SSHFactory(factory.SSHFactory):
publicKeys = {pubkey.sshType(): pubkey}
privateKeys = {privkey.sshType(): privkey}