mirror of
https://github.com/ComradCollective/Comrad
synced 2024-11-16 00:12:48 +00:00
finally! abolishing private key property
This commit is contained in:
parent
d7ea85167e
commit
376f5af789
@ -48,15 +48,20 @@ class TheOperator(Operator):
|
||||
|
||||
if data_unencr:
|
||||
self.log('unencrypted data:',data_unencr)
|
||||
|
||||
if BSEP2 in data_unencr:
|
||||
my_privkey_decr,phone_pubkey_decr = data_unencr.split(BSEP2)
|
||||
self.log('unencr??')
|
||||
|
||||
if data_unencr:
|
||||
data_unencr_s = data_unencr.decode()
|
||||
data_unencr_json = json.loads(data_unencr_s)
|
||||
if type(data_unencr_json) == dict:
|
||||
dict_merge(DATA, data_unencr_json)
|
||||
|
||||
if '_keychain' in DATA:
|
||||
if DATA.get('_keychain'):
|
||||
DATA['_keychain'] = self.valid_keychain(DATA['_keychain'])
|
||||
self.log('found keys in unencrypted data:',DATA['_keychain'])
|
||||
# self.log('found keys in unencrypted data:',DATA['_keychain'])
|
||||
# stop2
|
||||
|
||||
KEYCHAIN = self.keychain(allow_builtin=False,force=True,extra_keys=DATA['_keychain'])
|
||||
|
@ -40,14 +40,17 @@ class TheTelephone(Operator):
|
||||
async def req(self,json_coming_from_phone={},json_coming_from_caller={},caller=None,json_unencrypted={}):
|
||||
if not caller: caller=self.caller
|
||||
|
||||
|
||||
self.log('about to make a call. my keychain?',self.keychain())
|
||||
# stop
|
||||
# Three parts of every request:
|
||||
|
||||
# 0) Unencrypted. do not use except for very specific minimal reasons!
|
||||
# exchange half-complete pieces of info, both of which necessary for other
|
||||
unencr_header = self.op.privkey_decr + BSEP2 + self.pubkey_decr
|
||||
unencr_header = self.op.privkey_decr_ + BSEP2 + self.pubkey_decr_
|
||||
# self.log('unencr_header',unencr_header)
|
||||
|
||||
# ewrwerewrwerw
|
||||
# 1) only overall encryption layer E2EE Telephone -> Operator:
|
||||
if json_coming_from_phone:
|
||||
json_coming_from_phone_s = json.dumps(json_coming_from_phone)
|
||||
@ -67,10 +70,9 @@ class TheTelephone(Operator):
|
||||
|
||||
|
||||
|
||||
|
||||
req_data_encr = unencr_header + BSEP + json_coming_from_phone_b_encr + BSEP + json_coming_from_caller_b_encr
|
||||
self.log('req_data_encr',req_data_encr)
|
||||
sewerwe
|
||||
# sewerwe
|
||||
# req_data_encr = SMessage(self.privkey_,self.op.pubkey_).wrap(req_data)
|
||||
req_data_encr_b64 = b64encode(req_data_encr)
|
||||
self.log('req_data_encr_b64 <--',req_data_encr_b64)
|
||||
|
Loading…
Reference in New Issue
Block a user