more cleanup, remove supervisr imports

This commit is contained in:
Jens Langhammer
2018-11-16 10:08:15 +01:00
parent fbaab4efaf
commit a2904d3ade
42 changed files with 130 additions and 245 deletions

View File

@ -7,15 +7,15 @@ from defusedxml import ElementTree
from signxml import XMLSigner
from signxml.util import strip_pem_header
from passbook.core.models import Setting
from passbook.lib.utils import render_to_string
from passbook.lib.config import CONFIG
from passbook.lib.utils.template import render_to_string
LOGGER = getLogger(__name__)
def load_certificate(strip=False):
"""Get Public key from config"""
cert = Setting.get('certificate')
cert = CONFIG.y('saml_idp.certificate', '')
if strip:
return strip_pem_header(cert.replace('\r', '')).replace('\n', '')
return cert
@ -23,7 +23,7 @@ def load_certificate(strip=False):
def load_private_key():
"""Get Private Key from config"""
return Setting.get('private_key')
return CONFIG.y('saml_idp.key', '')
def sign_with_signxml(private_key, data, cert, reference_uri=None):