finally! abolishing private key property

operator-time
quadrismegistus 4 years ago
parent 3dc8eccb47
commit 1469d6eb8e

@ -370,9 +370,27 @@ class Keymaker(Logger):
keychain[key_name]=_key_encr
return keychain
def init_builtin_keys(self):
def check_builtin_keys(self):
global OMEGA_KEY,BUILTIN_KEYCHAIN
if OMEGA_KEY and BUILTIN_KEYCHAIN: return
if not os.path.exists(PATH_OMEGA_KEY) or not os.path.exists(PATH_BUILTIN_KEYCHAIN):
self.log('builtin keys not present??')
return
with open(PATH_OMEGA_KEY,'rb') as f:
OMEGA_KEY = KomradeSymmetricKeyWithoutPassphrase(
key=b64decode(f.read())
)
with open()
with open(PATH_BUILTIN_KEYCHAIN,'rb') as f:
local_builtin_keychain_encr = b64decode(f.read())
from mazes import tor_request
remote_builtin_keychain_encr = tor_request(PATH_OPERATOR_WEB_KEYS_URL)
print(local_builtin_keychain_encr)
print(remote_builtin_keychain_encr)
def forge_new_keys(self,

@ -202,8 +202,7 @@ def init_operators():
# save what we normally save for a client on the server -- The Op is a client from our pov
op_keys_to_keep_on_client = ['pubkey_decr']
op_keys_to_keep_on_3rdparty = ['pubkey_encr','privkey_encr']
op_keys_to_keep_on_server = [
'adminkey_encr',
op_keys_to_keep_on_server = ['adminkey_encr',
'privkey_decr_encr',
'privkey_decr_decr',
'adminkey_decr_encr',

@ -16,6 +16,7 @@ class TheTelephone(Operator):
)
self.caller=caller
self.allow_builtin=allow_builtin
self.check_builtin_keys()
def dial_operator(self,msg):
msg=msg.replace('/','_')

@ -120,4 +120,5 @@ WHY_MSG = 'Forge the password of memory: '
BUILTIN_KEYCHAIN = None
BUILTIN_KEYCHAIN = None
OMEGA_KEY = None
Loading…
Cancel
Save