Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ASN1 corrupted data" in ambienti Linux #1

Closed
danielegiallonardo opened this issue Mar 30, 2021 · 0 comments
Closed

"ASN1 corrupted data" in ambienti Linux #1

danielegiallonardo opened this issue Mar 30, 2021 · 0 comments

Comments

@danielegiallonardo
Copy link
Collaborator

In esecuzione su ambienti Linux (Docker, nello specifico), viene sollevata l'eccezione in oggetto in fase di deserializzazione del certificato presente nella response SAML. Di seguito il dettaglio dell'eccezione.

ASN1 corrupted data. The provided data is tagged with 'Universal' class value '13', but it should have been 'Universal' class value '16'.

System.Security.Cryptography.CryptographicException:
at Internal.Cryptography.Pal.OpenSslX509CertificateReader.FromBlob (System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Security.Cryptography.X509Certificates.X509Certificate..ctor (System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor (System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at CIE.AspNetCore.Authentication.Saml.SamlHandler.ValidateAuthnResponse (CIE.AspNetCore.Authentication, Version=1.1.3.0, Culture=neutral, PublicKeyToken=null)
at CIE.AspNetCore.Authentication.CieHandler+d__14.MoveNext (CIE.AspNetCore.Authentication, Version=1.1.3.0, Culture=neutral, PublicKeyToken=null)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at CIE.AspNetCore.Authentication.CieHandler+d__11.MoveNext (CIE.AspNetCore.Authentication, Version=1.1.3.0, Culture=neutral, PublicKeyToken=null)
Inner exception System.Formats.Asn1.AsnContentException handled at Internal.Cryptography.Pal.OpenSslX509CertificateReader.FromBlob:
at System.Formats.Asn1.AsnDecoder.CheckExpectedTag (System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
at System.Formats.Asn1.AsnDecoder.ReadSequence (System.Formats.Asn1, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51)
at System.Formats.Asn1.AsnValueReader.ReadSequence (System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.DecodeCore (System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.Decode (System.Security.Cryptography.X509Certificates, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)

L'errore ha già una risoluzione nota: dotnet/runtime#47005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant