+
+ #################### public interface
+
+ # xxx should that be called in the constructor ?
+ # typically user_private_key is ~/.ssh/id_rsa
+ def init_private_key_if_missing (self, user_private_key):
+ private_key_filename=self.private_key_filename()
+ if not os.path.isfile (private_key_filename):
+ key=self.plain_read(user_private_key)
+ self.plain_write(private_key_filename, key)
+ os.chmod(private_key_filename,os.stat(user_private_key).st_mode)
+ self.logger.debug("SfaClientBootstrap: Copied private key from %s into %s"%\
+ (user_private_key,private_key_filename))
+
+ # make sure we have the GID at hand
+ def bootstrap_gid (self):
+ if self.any_certificate_filename() is None:
+ self.get_self_signed_cert()
+ self.get_credential()
+ self.get_gid()
+
+ def server_proxy (self, url):
+ return SfaServerProxy (url, self.private_key_filename(), self.gid_filename())
+
+ def get_credential_string (self):
+ return self.plain_read (self.get_credential())
+
+ # more to come to get credentials about other objects (authority/slice)
+
+ #################### private details