Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
domschiener committed Sep 8, 2015
1 parent e04316c commit 6a7d984
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Empty file added entities.txt
Empty file.
10 changes: 4 additions & 6 deletions helpers.py
Expand Up @@ -13,7 +13,8 @@
from pprint import pprint


gpg = gnupg.GPG(homedir='/Users/domsch/.gnupg', keyring='pubring.gpg', secring='secring.gpg')
#IF YOU HAVE A DIFFERENT LOCAL PGP DIRECTORY, CHANGE IT HERE
gpg = gnupg.GPG(homedir='~/.gnupg', keyring='pubring.gpg', secring='secring.gpg')


###
Expand Down Expand Up @@ -74,7 +75,7 @@ def generate_privkey(source):


def store_entity(personal_entity):
entity_stored = open("/Users/domsch/Desktop/fingerprint-project/entities.txt", 'a')
entity_stored = open("./entities.txt", 'a')
pickle.dump(personal_entity, entity_stored)
entity_stored.close()
return personal_entity
Expand All @@ -87,7 +88,7 @@ def store_entity(personal_entity):

def get_entities():
list_entities = []
with open("/Users/domsch/Desktop/fingerprint-project/entities.txt", "rb") as entity_stored:
with open("./entities.txt", "rb") as entity_stored:
try:
while True:
get_entity = pickle.load(entity_stored)
Expand Down Expand Up @@ -185,9 +186,6 @@ def SP_authorize(entity, name, gpg_key):


def accesstoken(gpg_fingerprint, identity):
print
print "Fingerprint: "
print gpg_fingerprint
return gpg.encrypt(identity,gpg_fingerprint)


Expand Down
6 changes: 6 additions & 0 deletions main.py
Expand Up @@ -608,6 +608,9 @@ def auth_choice(self):
wrong_path = tk.Label(self, text="Wrong file path. Please provide the correct and full path to your desired image", wraplength=400)
wrong_path.pack()
else:
##
## FILES FOR FINGERPRINT SCANNER WILL BE RELEASED SOON
##
if os.path.isfile("./fingerprint.bmp"):
priv_key = generate_privkey(open("./fingerprint.bmp",'rb+').read())
self.generate()
Expand Down Expand Up @@ -782,6 +785,9 @@ def authenticate_entity(self):
wrong_path = tk.Label(self, text="Wrong file path. Please provide the correct and full path to your desired image", wraplength=400)
wrong_path.pack()
else:
##
## FILES FOR FINGERPRINT SCANNER WILL BE RELEASED SOON
##
chosen_secret = "./fingerprint.bmp"

if os.path.isfile(chosen_secret):
Expand Down

0 comments on commit 6a7d984

Please sign in to comment.