Skip to content

Commit 0c4f846

Browse files
author
Rahul Raina
committed
Adding support to read idp.crt from certs folder
1 parent 6b41477 commit 0c4f846

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/onelogin/saml2/settings.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,12 @@ def get_idp_cert(self):
558558
:returns: IdP public cert
559559
:rtype: string
560560
"""
561-
return self.__idp.get('x509cert')
561+
cert = self.__idp.get('x509cert')
562+
cert_file_name = self.__paths['cert'] + 'idp.crt'
563+
if not cert and exists(cert_file_name):
564+
with open(cert_file_name) as f:
565+
cert = f.read()
566+
return cert or None
562567

563568
def get_idp_data(self):
564569
"""

0 commit comments

Comments
 (0)