summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/keymanager/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/keymanager/__init__.py')
-rw-r--r--src/leap/bitmask/keymanager/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/bitmask/keymanager/__init__.py b/src/leap/bitmask/keymanager/__init__.py
index ed3726ad..f0f82676 100644
--- a/src/leap/bitmask/keymanager/__init__.py
+++ b/src/leap/bitmask/keymanager/__init__.py
@@ -90,7 +90,6 @@ class KeyManager(object):
self.api_uri = api_uri
self.api_version = api_version
self.uid = uid
- self._openpgp = OpenPGPScheme(soledad, gpgbinary=gpgbinary)
create = self._create_combined_bundle_file
try:
self._combined_ca_bundle = combined_ca_bundle or create()
@@ -102,11 +101,15 @@ class KeyManager(object):
self._nicknym = Nicknym(self._nickserver_uri,
self._ca_cert_path, self._token)
self.refresher = None
+ self._init_gpg(soledad, gpgbinary)
#
# utilities
#
+ def _init_gpg(self, soledad, gpgbinary):
+ self._openpgp = OpenPGPScheme(soledad, gpgbinary=gpgbinary)
+
def start_refresher(self):
self.refresher = RandomRefreshPublicKey(self._openpgp, self)
self.refresher.start()
@@ -376,6 +379,7 @@ class KeyManager(object):
def _set_token(self, token):
self._token = token
+ self._nicknym.token = token
token = property(
_get_token, _set_token, doc='The session token.')