fixed pgp generation, work on onion
This commit is contained in:
parent
cb3de7056c
commit
6a1a448eab
6 changed files with 46 additions and 6 deletions
|
@ -29,17 +29,23 @@ class Core:
|
|||
'''
|
||||
self.queueDB = 'data/queue.db'
|
||||
self.peerDB = 'data/peers.db'
|
||||
self.ownPGPID = ''
|
||||
|
||||
#self.daemonQueue() # Call to create the DB if it doesn't exist
|
||||
return
|
||||
|
||||
def generateMainPGP(self):
|
||||
def generateMainPGP(self, myID):
|
||||
''' Generate the main PGP key for our client. Should not be done often.
|
||||
Uses own PGP home folder in the data/ directory. '''
|
||||
# Generate main pgp key
|
||||
gpg = gnupg.GPG(homedir='data/pgp/')
|
||||
input_data = gpg.gen_key_input(key_type="RSA", key_length=2048, name_real='anon', name_comment='Onionr key', name_email='anon@onionr')
|
||||
gpg = gnupg.GPG(gnupghome='./data/pgp/')
|
||||
input_data = gpg.gen_key_input(key_type="RSA", key_length=2048, name_real=myID, name_email='anon@onionr')
|
||||
#input_data = gpg.gen_key_input(key_type="RSA", key_length=1024)
|
||||
key = gpg.gen_key(input_data)
|
||||
# Write the key
|
||||
myFingerpintFile = open('data/own-fingerprint.txt', 'w')
|
||||
myFingerpintFile.write(key.fingerprint)
|
||||
myFingerpintFile.close()
|
||||
return
|
||||
|
||||
def addPeer(self, peerID, name=''):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue