Subject: Singing an AuthnRequest with SHA-256
Date: 2016-01-25 21:55:07
From: Chris Scalzo
Source: singing-authnrequest-sha-256

I am trying to use ComponentPro to talk to MS:ADSF... ADSF want the AuthnRquest sign with SHA-256 and not SHA-1 but do not know what to put in the magic string...

[code lang='c#']public AuthnRequest GetAuthnRequest(String path)

            AuthnRequest rval = new AuthnRequest
                Destination = Destination,
                ForceAuthn = false,
                Issuer = new Issuer(""),
                ProtocolBinding = ProtocolBinding,
                NameIdPolicy = new NameIdPolicy(null, null, true),
                AssertionConsumerServiceUrl = "",
            rval.Sign(new X509Certificate2(System.IO.Path.Combine(path, "Saml\\public_privatekey.pfx"), PASSWORD, X509KeyStorageFlags.MachineKeySet),  "","");
            return rval;
Not sure what the last two strings should be be to get it to use SHA-256, or if there is just an easy way to do it that we are missing.
---------------------------------------------------------------------- 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