2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-05 21:20:51 +00:00
This commit is contained in:
quadrismegistus 2020-09-14 05:19:55 +01:00
parent 071656bc6a
commit cae482649f
2 changed files with 6 additions and 5 deletions

View File

@ -108,17 +108,18 @@ class Komrade(Caller):
self.log(f"@Keymaker: Store your private key on your device hardware ONLY\nas it was encrypted by your password-generated key:\n\n[Encrypted Private Key]\n({make_key_discreet_str(privkey_encr_obj.data_b64)})")
## 6) Test keychain works
privkey_decr2 = KomradeSymmetricKeyWithPassphrase(passphrase)
assert privkey_decr2.decrypt(privkey_encr) == privkey.data
#privkey_decr2 = KomradeSymmetricKeyWithPassphrase(passphrase)
#assert privkey_decr2.decrypt(privkey_encr) == privkey.data
self._keychain['pubkey']=pubkey
self._keychain['privkey_encr']=privkey_encr_obj
self._keychain['privkey']=privkey
# self._keychain['privkey_decr']=privkey_decr
# we should be able to reassemble privkey now?
# self.log('this is my keychain now:')
assert 'privkey' in self.keychain()
#assert 'privkey' in self.keychain()
# self.log('My keychain now looks like:',dict_format(self.keychain()))
self.log('My keychain now looks like:',dict_format(self.keychain()))
## 6) More narration?
if SHOW_STATUS:

View File

@ -70,7 +70,7 @@ class Operator(Keymaker):
path_crypt_keys=path_crypt_keys, path_crypt_data=path_crypt_data)
# self.find_pubkey_and_name(name,pubkey)
self.log('booted with operator with:',self.name,self.pubkey,self.find_pubkey(name),'??')
# self.log('booted with operator with:',self.name,self.pubkey,self.find_pubkey(name),'??')
# def boot(self):
# ## get both name and pubkey somehow