@@ -73,8 +73,8 @@ def metadata_tostring_fix(desc, nspair, xmlstring=""):
73
73
return xmlstring
74
74
75
75
76
- def create_metadata_string (configfile , config , valid , cert , keyfile , mid , name ,
77
- sign ):
76
+ def create_metadata_string (configfile , config = None , valid = None , cert = None ,
77
+ keyfile = None , mid = None , name = None , sign = None ):
78
78
valid_for = 0
79
79
nspair = {"xs" : "http://www.w3.org/2001/XMLSchema" }
80
80
#paths = [".", "/opt/local/bin"]
@@ -83,17 +83,15 @@ def create_metadata_string(configfile, config, valid, cert, keyfile, mid, name,
83
83
valid_for = int (valid ) # Hours
84
84
85
85
eds = []
86
- if config is not None :
87
- eds .append (entity_descriptor (config ))
88
- else :
86
+ if config is None :
89
87
if configfile .endswith (".py" ):
90
88
configfile = configfile [:- 3 ]
91
89
config = Config ().load_file (configfile , metadata_construction = True )
92
- eds .append (entity_descriptor (config ))
90
+ eds .append (entity_descriptor (config ))
93
91
94
92
conf = Config ()
95
- conf .key_file = keyfile
96
- conf .cert_file = cert
93
+ conf .key_file = config . key_file or keyfile
94
+ conf .cert_file = config . cert_file or cert
97
95
conf .debug = 1
98
96
conf .xmlsec_binary = config .xmlsec_binary
99
97
secc = security_context (conf )
0 commit comments