Beispiel #1
0
 def add_key(self, args):
     '''Add a key to the repository.'''
     if self.quit_if_unencrypted():
         return
     self.app.settings.require('keyid')
     repo = self.app.get_repository_object()
     keyid = self.app.settings['keyid']
     key = obnamlib.get_public_key(keyid)
     clients = self._find_clientdirs(repo, args)
     for toplevel in self._shared + clients:
         self.add_to_userkeys(repo, toplevel, key)
         self.rewrite_symmetric_key(repo, toplevel)
Beispiel #2
0
 def add_key(self, args):
     '''Add a key to the repository.'''
     if self.quit_if_unencrypted():
         return
     self.app.settings.require('keyid')
     repo = self.app.open_repository()
     keyid = self.app.settings['keyid']
     key = obnamlib.get_public_key(keyid)
     clients = self._find_clientdirs(repo, args)
     for toplevel in self._shared + clients:
         self.add_to_userkeys(repo, toplevel, key)
         self.rewrite_symmetric_key(repo, toplevel)
Beispiel #3
0
 def add_key(self, args):
     '''Add a key to the repository.'''
     if self.quit_if_unencrypted():
         return
     self.app.settings.require('keyid')
     repo = self.app.get_repository_object()
     keyid = self.app.settings['keyid']
     key = obnamlib.get_public_key(keyid, gpghome=self.gnupghome)
     clients = self._find_clientdirs(repo, args)
     for toplevel in repo.get_shared_directories() + clients:
         self.add_to_userkeys(repo, toplevel, key)
         self.rewrite_symmetric_key(repo, toplevel)
 def test_exports_key(self):
     key = obnamlib.get_public_key(self.keyid, gpghome=self.gpghome)
     self.assert_('-----BEGIN PGP PUBLIC KEY BLOCK-----' in key)
Beispiel #5
0
 def pubkey(self):
     if self._pubkey is None:
         self._pubkey = obnamlib.get_public_key(self.keyid)
     return self._pubkey
Beispiel #6
0
 def pubkey(self):
     if self._pubkey is None:
         self._pubkey = obnamlib.get_public_key(self.keyid)
     return self._pubkey
Beispiel #7
0
 def pubkey(self):
     if self._pubkey is None:
         self._pubkey = obnamlib.get_public_key(self.keyid,
                                                gpghome=self.gnupghome)
     return self._pubkey
Beispiel #8
0
 def test_exports_key(self):
     key = obnamlib.get_public_key(self.keyid, gpghome=self.gpghome)
     self.assert_('-----BEGIN PGP PUBLIC KEY BLOCK-----' in key)
Beispiel #9
0
 def pubkey(self):
     if self._pubkey is None:
         self._pubkey = obnamlib.get_public_key(self.keyid,
                                                gpghome=self.gnupghome)
     return self._pubkey