master
marxzuckerburg 4 years ago
parent b562ee339e
commit 3367ca7386

@ -309,6 +309,10 @@ class ProfileScreen(ProtectedScreen):
# desc from us
self.log(f'do I know where {self.app.username} lives?')
self.log('local',self.app.comrad.exists_locally(self.app.username))
self.log('contact',self.app.comrad.exists_locally_as_contact(self.app.username))
self.log('account',self.app.comrad.exists_locally_as_account(self.app.username))
if not self.app.comrad.exists_locally(self.app.username):
author_desc=f'Comrad @{self.app.username} is not a contact of yours.'
self.author_desc = AuthorDesc(text=author_desc)

@ -66,6 +66,7 @@ class ComradX(Caller):
def exists_locally(self,name=None):
pubkey=self.find_pubkey(name=name)
self.log(f'I am {self.name}, looking for {name}, and found pubkey {pubkey} (mine is {self.pubkey})')
return bool(pubkey)
def exists_locally_as_contact(self,name=None):

@ -281,20 +281,21 @@ class Keymaker(Logger):
def find_pubkey(self,name=None):
# self.log('<-',name)
self.log('<-',name)
if not name: name=self.name
self.log('<---',name)
if self.name==name and 'pubkey' in self._keychain and self._keychain['pubkey']:
pk=self._keychain['pubkey']
return ComradAsymmetricPublicKey(b64dec(pk)) if type(pk)==bytes else pk
res = self.crypt_keys.get(name, prefix='/pubkey/')
# self.log(f'crypt_keys({name}) -->',res)
self.log(f'crypt_keys({name}) -->',res)
if not res:
res = self.load_qr(self.name)
# self.log(f'load_qr({name}) -->',res)
res = self.load_qr(name)
self.log(f'load_qr({name}) -->',res)
if not res: return
key = ComradAsymmetricPublicKey(b64dec(res))
# self.log('-->',key)
self.log('-->',key)
return key
# self.log('I don\'t know my public key! Do I need to register?')
# raise ComradException(f'I don\'t know my public key!\n{self}\n{self._keychain}')

@ -216,8 +216,14 @@ then
fi
if [ "$machine" = "Cygwin" ] || [ "$machine" = "MinGw" ]
if [ "$machine" = "MinGw" ]
then
# make sure packages installed
pacman -S mingw-w64-x86_64-zbar curl wget unzip gcc make openssl-devel
arch="$(uname -m)"
if [ "$arch" = "x86_64" ]
then
@ -230,10 +236,13 @@ then
# rm miniconda.exe
# cmd "miniconda.exe /InstallationType=JustMe /RegisterPython=0 /S /D=$path_conda"
path_conda_windows="${path_conda//\//\\}"
wincmd="miniconda.exe /S /D=C:\\msys64$path_conda_windows"
echo "executing! $wincmd"
cmd //c "$wincmd"
### install themis from source

Loading…
Cancel
Save