api now returns pgp keys

This commit is contained in:
Kevin Froman 2018-01-20 03:22:07 -06:00
parent 6a1a448eab
commit 0042e2fe51
No known key found for this signature in database
GPG Key ID: 0D414D0FE405B63B

View File

@ -23,6 +23,7 @@ from multiprocessing import Process
import configparser, sys, random, threading, hmac, hashlib, base64, time, math, gnupg, os
from core import Core
import onionrutils
class API:
''' Main http api (flask)'''
def validateToken(self, token):
@ -49,6 +50,7 @@ class API:
self.debug = debug
self._privateDelayTime = 3
self._core = Core()
self._utils = onionrutils.OnionrUtils()
app = flask.Flask(__name__)
bindPort = int(self.config['CLIENT']['PORT'])
self.bindPort = bindPort
@ -126,7 +128,7 @@ class API:
elif action == 'setHMAC':
pass
elif action == 'getPGP':
ascii_armored_public_keys = gpg.export_keys('')
resp = Response(self._utils.exportMyPubkey())
return resp