@@ -589,6 +589,17 @@ def do_aa_descriptor(conf, cert=None, enc_cert=None):
589589 aad = md .AttributeAuthorityDescriptor ()
590590 aad .protocol_support_enumeration = samlp .NAMESPACE
591591
592+ exts = conf .getattr ("extensions" , "aa" )
593+ if exts :
594+ if aad .extensions is None :
595+ aad .extensions = md .Extensions ()
596+
597+ for key , val in exts .items ():
598+ _ext = do_extensions (key , val )
599+ if _ext :
600+ for _e in _ext :
601+ aad .extensions .add_extension_element (_e )
602+
592603 endps = conf .getattr ("endpoints" , "aa" )
593604
594605 if endps :
@@ -617,6 +628,17 @@ def do_aq_descriptor(conf, cert=None, enc_cert=None):
617628 aqs = md .AuthnAuthorityDescriptor ()
618629 aqs .protocol_support_enumeration = samlp .NAMESPACE
619630
631+ exts = conf .getattr ("extensions" , "aa" )
632+ if exts :
633+ if aqs .extensions is None :
634+ aqs .extensions = md .Extensions ()
635+
636+ for key , val in exts .items ():
637+ _ext = do_extensions (key , val )
638+ if _ext :
639+ for _e in _ext :
640+ aqs .extensions .add_extension_element (_e )
641+
620642 endps = conf .getattr ("endpoints" , "aq" )
621643
622644 if endps :
@@ -637,6 +659,17 @@ def do_pdp_descriptor(conf, cert=None, enc_cert=None):
637659
638660 pdp .protocol_support_enumeration = samlp .NAMESPACE
639661
662+ exts = conf .getattr ("extensions" , "pdp" )
663+ if exts :
664+ if pdp .extensions is None :
665+ pdp .extensions = md .Extensions ()
666+
667+ for key , val in exts .items ():
668+ _ext = do_extensions (key , val )
669+ if _ext :
670+ for _e in _ext :
671+ pdp .extensions .add_extension_element (_e )
672+
640673 endps = conf .getattr ("endpoints" , "pdp" )
641674
642675 if endps :
0 commit comments