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