From a712961ff12aa9ea387c3e71256757be83d1d9a9 Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Thu, 17 Sep 2020 09:34:27 +0100 Subject: [PATCH] komrade update! --- komrade/backend/keymaker.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/komrade/backend/keymaker.py b/komrade/backend/keymaker.py index 1dbfa4c..b1182d4 100644 --- a/komrade/backend/keymaker.py +++ b/komrade/backend/keymaker.py @@ -265,18 +265,22 @@ class Keymaker(Logger): def find_pubkey(self,name=None): + self.log('<-',name) if not name: name=self.name if 'pubkey' in self._keychain and self._keychain['pubkey']: pk=self._keychain['pubkey'] return KomradeAsymmetricPublicKey(b64dec(pk)) if type(pk)==bytes else pk res = self.load_qr(self.name) + self.log(f'load_qr({name}) -->',res) + if not res: res = self.crypt_keys.get(name, prefix='/pubkey/') if not res: return - - return KomradeAsymmetricPublicKey(b64dec(res)) - + + key = KomradeAsymmetricPublicKey(b64dec(res)) + self.log('-->',key) + return key # self.log('I don\'t know my public key! Do I need to register?') # raise KomradeException(f'I don\'t know my public key!\n{self}\n{self._keychain}') # return res