mirror of
https://github.com/ComradCollective/Comrad
synced 2024-11-03 23:15:33 +00:00
komrade update!
This commit is contained in:
parent
2618bd4876
commit
a712961ff1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user