How to sign security tokens using SHA256 in WIF STS?

I am using Thinktecture STS and would like to sign issued tokens using SHA256 instead of SHA1? I tried to add the algorithm to the application using:

CryptoConfig.AddAlgorithm(
         typeof(RSAPKCS1SHA256SignatureDescription),
         "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");

      

But it starts giving an error:

Invalid algorithm specified

Knowing that the certificate I'm using is SHA256 compliant. Any idea?

+3


source to share





All Articles