mirror of
https://github.com/ComradCollective/Comrad
synced 2024-11-17 21:25:37 +00:00
finally! abolishing private key property
This commit is contained in:
parent
acbb49c95c
commit
fdfba96302
@ -61,22 +61,23 @@ class TheOperator(Operator):
|
|||||||
|
|
||||||
KEYCHAIN = self.keychain(allow_builtin=False,force=True,extra_keys=DATA['_keychain'])
|
KEYCHAIN = self.keychain(allow_builtin=False,force=True,extra_keys=DATA['_keychain'])
|
||||||
self.log('as of now 2, I the operator have these keys:',KEYCHAIN.keys())
|
self.log('as of now 2, I the operator have these keys:',KEYCHAIN.keys())
|
||||||
stopppppppp
|
# stopppppppp
|
||||||
self.log('DATA as of now!?',DATA)
|
self.log('DATA as of now!?',DATA)
|
||||||
# stop
|
# stop
|
||||||
|
|
||||||
if data_encr_by_phone:
|
if data_encr_by_phone:
|
||||||
|
|
||||||
# then try to unwrap telephone encryption
|
# then try to unwrap telephone encryption
|
||||||
me_privkey = self.privkey(keychain = DATA.get('_keychain',{}))
|
me_privkey = KEYCHAIN.get('privkey') #self.privkey(keychain = DATA.get('_keychain',{}))
|
||||||
|
if not me_privkey:
|
||||||
them_pubkey = self.phone.pubkey_
|
self.log('!! could not assemble my private key. failing.')
|
||||||
|
return OPERATOR_INTERCEPT_MESSAGE
|
||||||
self.log('as of now 3, I the operator have these keys:',self.keychain().keys())
|
\
|
||||||
|
# self.log('as of now 3, I the operator have these keys:',self.keychain().keys())
|
||||||
self.log('me_privkey now',me_privkey)
|
self.log('me_privkey now',me_privkey)
|
||||||
print(me_privkey, '<--',them_pubkey)
|
# print(me_privkey, '<--',them_pubkey)
|
||||||
try:
|
try:
|
||||||
data_unencr_by_phone = SMessage(me_privkey, them_pubkey).unwrap(data_encr_by_phone)
|
data_unencr_by_phone = SMessage(me_privkey, self.phone.pubkey_).unwrap(data_encr_by_phone)
|
||||||
self.log('decrypted data !!!:',data_unencr_by_phone)
|
self.log('decrypted data !!!:',data_unencr_by_phone)
|
||||||
except ThemisError as e:
|
except ThemisError as e:
|
||||||
self.log('not really from the telephone?',e)
|
self.log('not really from the telephone?',e)
|
||||||
|
Loading…
Reference in New Issue
Block a user