From 0042e2fe514b10444639b1c21458f43e29b0ddaa Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sat, 20 Jan 2018 03:22:07 -0600 Subject: [PATCH] api now returns pgp keys --- onionr/api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onionr/api.py b/onionr/api.py index 6933caa2..7df0a0c4 100755 --- a/onionr/api.py +++ b/onionr/api.py @@ -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