File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 66__author__ = 'roland'
77
88DIGEST_METHODS = {
9- # "hmac-md5": 'http://www.w3.org/2001/04/xmldsig-more#md5', # test framework only!
9+ "hmac-md5" : 'http://www.w3.org/2001/04/xmldsig-more#md5' , # test framework only!
1010 "hmac-sha1" : 'http://www.w3.org/2000/09/xmldsig#sha1' ,
1111 "hmac-sha224" : 'http://www.w3.org/2001/04/xmldsig-more#sha224' ,
1212 "hmac-sha256" : 'http://www.w3.org/2001/04/xmlenc#sha256' ,
1616}
1717
1818SIGNING_METHODS = {
19- # "rsa-md5": 'http://www.w3.org/2001/04/xmldsig-more#rsa-md5',
19+ "rsa-md5" : 'http://www.w3.org/2001/04/xmldsig-more#rsa-md5' ,
2020 "rsa-ripemd160" : 'http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160' ,
2121 "rsa-sha1" : 'http://www.w3.org/2000/09/xmldsig#rsa-sha1' ,
2222 "rsa-sha224" : 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha224' ,
Original file line number Diff line number Diff line change 3030COMMON_ARGS = [
3131 "debug" ,
3232 "entityid" ,
33+ "xmlsec_disabled_algs" ,
3334 "xmlsec_binary" ,
3435 "key_file" ,
3536 "cert_file" ,
@@ -189,6 +190,7 @@ class Config(object):
189190 def __init__ (self , homedir = "." ):
190191 self ._homedir = homedir
191192 self .entityid = None
193+ self .xmlsec_disabled_algs = []
192194 self .xmlsec_binary = None
193195 self .xmlsec_path = []
194196 self .debug = False
Original file line number Diff line number Diff line change @@ -735,6 +735,8 @@ def entity_descriptor(confd):
735735 _add_attr_to_entity_attributes (entd .extensions , attr )
736736
737737 for item in algorithm_support_in_metadata (confd .xmlsec_binary ):
738+ if item .algorithm in confd .__dict__ .get ('xmlsec_disabled_algs' ):
739+ continue
738740 if not entd .extensions :
739741 entd .extensions = md .Extensions ()
740742 entd .extensions .add_extension_element (item )
You can’t perform that action at this time.
0 commit comments