def __init__(self, settings=None): if isinstance(settings, Settings): self.settings = settings.copy() else: self.settings = Settings(settings) self.auth_client = service.RMCClient(self.settings) self.secure_client = service.RMCClient(self.settings) self.auth_proto = authentication.AuthenticationClient(self.auth_client) self.secure_proto = secure.SecureConnectionClient(self.secure_client) if self.settings.get("kerberos.key_derivation") == 0: self.key_derivation = kerberos.KeyDerivationOld(65000, 1024) else: self.key_derivation = kerberos.KeyDerivationNew(1, 1) self.pid = None self.local_station = None self.public_station = None
def __init__(self, access_key, version, settings=None): if settings: self.settings = settings.copy() else: self.settings = Settings() self.settings.set("server.access_key", access_key) self.settings.set("server.version", version) self.auth_client = service.RMCClient(self.settings) self.secure_client = service.RMCClient(self.settings) self.auth_proto = authentication.AuthenticationClient(self.auth_client) self.secure_proto = secure.SecureConnectionClient(self.secure_client) if self.settings.get("kerberos.key_derivation") == 0: self.key_derivation = kerberos.KeyDerivationOld(65000, 1024) else: self.key_derivation = kerberos.KeyDerivationNew(1, 1) self.my_pid = None self.local_station = None self.public_station = None