2019-08-16 15:59:44 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*-coding:UTF-8 -*
|
|
|
|
|
|
|
|
import os
|
2019-10-17 14:39:43 +00:00
|
|
|
import sys
|
2019-08-16 15:59:44 +00:00
|
|
|
import redis
|
|
|
|
|
2019-10-29 15:52:33 +00:00
|
|
|
sys.path.append(os.path.join(os.environ['AIL_BIN'], 'packages'))
|
2020-02-11 14:48:30 +00:00
|
|
|
import Correlation
|
|
|
|
import Item
|
2019-08-16 15:59:44 +00:00
|
|
|
|
2019-10-29 15:52:33 +00:00
|
|
|
sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
|
|
|
|
import ConfigLoader
|
|
|
|
|
|
|
|
config_loader = ConfigLoader.ConfigLoader()
|
|
|
|
serv_metadata = config_loader.get_redis_conn("ARDB_Metadata")
|
|
|
|
config_loader = None
|
|
|
|
|
2020-02-11 14:48:30 +00:00
|
|
|
pgp = Correlation.Correlation('pgpdump', ['key', 'mail', 'name'])
|
2019-08-16 15:59:44 +00:00
|
|
|
|
|
|
|
def get_pgp(request_dict, pgp_type):
|
|
|
|
# basic verification
|
|
|
|
res = pgpdump.verify_correlation_field_request(request_dict, pgp_type)
|
|
|
|
if res:
|
|
|
|
return res
|
|
|
|
# cerify address
|
|
|
|
field_name = request_dict.get(pgp_type)
|
|
|
|
|
|
|
|
return pgpdump.get_correlation(request_dict, pgp_type, field_name)
|