Subject: Namespace for Metadata KeyInfo
Date: 2021-03-15 22:18:43
From: Luis de
Source: namespace-metadata-keyinfo
----------------------------------------------------------------------

I'm using the following code to add the keyinfo:

            ComponentPro.Saml2.Metadata.KeyDescriptor mdKey = new ComponentPro.Saml2.Metadata.KeyDescriptor();
            ComponentPro.Saml2.Metadata.KeyDescriptor mdKey2 = new ComponentPro.Saml2.Metadata.KeyDescriptor();
            mdKey.Use = "signing";
            KeyInfoX509Data keyData = new KeyInfoX509Data(cert);   // Create KeyInfo. 
            KeyInfo keyInfo = new KeyInfo();
            keyInfo.AddClause(keyData);
            mdKey.KeyInfo = keyInfo.GetXml();
            ssoDescriptor.KeyDescriptors.Add(mdKey);

            mdKey2 = new ComponentPro.Saml2.Metadata.KeyDescriptor( );
            
            mdKey2.Use = "encryption";
            KeyInfoX509Data keyData2 = new KeyInfoX509Data(cert);   // Create KeyInfo. 
            keyInfo = new KeyInfo();
            keyInfo.AddClause(keyData2);
            mdKey2.KeyInfo = keyInfo.GetXml();
            ssoDescriptor.KeyDescriptors.Add(mdKey2);


A vendor has the need to have me send the namespace in the following manner:

      
        
          

The code above generates the metadata in the following manner:

    
    
    

How do I change it so that it add the "ds:" to the metadata?  I can't just do a search/replace since I'm signing it, and there's no obvious method to change it.

I'm using ComponentPro.SAML v7.2.40.234.

Thanks



----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index