Brandon.Staley
Brandon.Staley

Reputation: 1802

Digest verification failed for Reference

I have implementation of a custom STS. After being authenticated and redirected but before the page was loaded I would receive this error:

[CryptographicException: Digest verification failed for Reference '#_8e0aea1a-713d-4536-8fac-a768073395e9'.]

The reference number would change every time I tried.

Upvotes: 3

Views: 4830

Answers (2)

stack247
stack247

Reputation: 5747

We had similar issue and was able to resolve it using LF (Unix) newline separator when encoding the Base64.

Specifically, in our implementation, we require HTTP POST binding when submitting the SAML Response. The SAML Response is Base64-encoded and it fails when encoded using CRLF (Windows) newline separator. But when encode using LF (Unix), it works. Also, the Character Set must be UTF 8.

This is the setting we use when encode using https://www.base64encode.org/ tool

enter image description here

Upvotes: 0

Brandon.Staley
Brandon.Staley

Reputation: 1802

I eventually found out that the claims, I had loaded from the database, had carriage return line feeds. Once I replaced those I had no more issues.

Upvotes: 4

Related Questions