@@ -589,6 +589,17 @@ def do_aa_descriptor(conf, cert=None, enc_cert=None):
589
589
aad = md .AttributeAuthorityDescriptor ()
590
590
aad .protocol_support_enumeration = samlp .NAMESPACE
591
591
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
+
592
603
endps = conf .getattr ("endpoints" , "aa" )
593
604
594
605
if endps :
@@ -617,6 +628,17 @@ def do_aq_descriptor(conf, cert=None, enc_cert=None):
617
628
aqs = md .AuthnAuthorityDescriptor ()
618
629
aqs .protocol_support_enumeration = samlp .NAMESPACE
619
630
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
+
620
642
endps = conf .getattr ("endpoints" , "aq" )
621
643
622
644
if endps :
@@ -637,6 +659,17 @@ def do_pdp_descriptor(conf, cert=None, enc_cert=None):
637
659
638
660
pdp .protocol_support_enumeration = samlp .NAMESPACE
639
661
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
+
640
673
endps = conf .getattr ("endpoints" , "pdp" )
641
674
642
675
if endps :
0 commit comments