api now returns pgp keys
This commit is contained in:
parent
6a1a448eab
commit
0042e2fe51
@ -23,6 +23,7 @@ from multiprocessing import Process
|
|||||||
import configparser, sys, random, threading, hmac, hashlib, base64, time, math, gnupg, os
|
import configparser, sys, random, threading, hmac, hashlib, base64, time, math, gnupg, os
|
||||||
|
|
||||||
from core import Core
|
from core import Core
|
||||||
|
import onionrutils
|
||||||
class API:
|
class API:
|
||||||
''' Main http api (flask)'''
|
''' Main http api (flask)'''
|
||||||
def validateToken(self, token):
|
def validateToken(self, token):
|
||||||
@ -49,6 +50,7 @@ class API:
|
|||||||
self.debug = debug
|
self.debug = debug
|
||||||
self._privateDelayTime = 3
|
self._privateDelayTime = 3
|
||||||
self._core = Core()
|
self._core = Core()
|
||||||
|
self._utils = onionrutils.OnionrUtils()
|
||||||
app = flask.Flask(__name__)
|
app = flask.Flask(__name__)
|
||||||
bindPort = int(self.config['CLIENT']['PORT'])
|
bindPort = int(self.config['CLIENT']['PORT'])
|
||||||
self.bindPort = bindPort
|
self.bindPort = bindPort
|
||||||
@ -126,7 +128,7 @@ class API:
|
|||||||
elif action == 'setHMAC':
|
elif action == 'setHMAC':
|
||||||
pass
|
pass
|
||||||
elif action == 'getPGP':
|
elif action == 'getPGP':
|
||||||
ascii_armored_public_keys = gpg.export_keys('')
|
resp = Response(self._utils.exportMyPubkey())
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user