Skip to content

Commit b16009d

Browse files
committed
added init code for idp cert for sp-04
1 parent 622df26 commit b16009d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/sp_test/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ def idp_configure(self, metadata_construction=False):
116116
self.idp_config.ca_certs = self.args.ca_certs
117117
else:
118118
self.idp_config.ca_certs = "../keys/cacert.pem"
119+
# hack to change idp cert without config change. TODO: find interface to
120+
# change IDP cert after __init__
121+
if self.args.oper == 'sp-04':
122+
self.idp_config.cert_file = os.path.join(self.args.keysdir, "non_md_cert.pem")
123+
self.idp_config.key_file = os.path.join(self.args.keysdir, "non_md_key.pem")
124+
for f in [self.idp_config.cert_file, self.idp_config.key_file]:
125+
if not os.path.isfile(f):
126+
print "File not found: %s" % os.path.abspath(f)
127+
raise
119128

120129
self.idp = Server(config=self.idp_config)
121130

0 commit comments

Comments
 (0)