You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
La libreria smette di funzionare dopo aver aggiornato a .NET 9.
To Reproduce
Aggiornando la mia applicazione a .NET 9 la libreria smette di funzionare dando il seguente errore:
SPID.AspNetCore.Authentication.Exceptions.SpidException: La chiave privata del certificato non è presente\r\n ---> System.Security.Cryptography.CryptographicException: Keyset non esistente.\r\n at System.Security.Cryptography.CngKey.Open(String keyName, CngProvider provider, CngKeyOpenOptions openOptions)\r\n at System.Security.Cryptography.X509Certificates.CertificatePal.GetPrivateKey[T](Func`2 createCsp, Func`2 createCng)\r\n at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()\r\n at SPID.AspNetCore.Authentication.Helpers.XmlHelpers.SignXMLDoc(XmlDocument doc, X509Certificate2 certificate, String referenceUri, String signatureMethod, String digestMethod)\r\n --- End of inner exception stack trace ---\r\n at SPID.AspNetCore.Authentication.Helpers.XmlHelpers.SignXMLDoc(XmlDocument doc, X509Certificate2 certificate, String referenceUri, String signatureMethod, String digestMethod)\r\n at SPID.AspNetCore.Authentication.Saml.SamlHandler.SignDocumentInternal(String serializedDocument, X509Certificate2 certificate, String uuid, Int32 childIndex)\r\n at SPID.AspNetCore.Authentication.Saml.SamlHandler.SignSerializedDocument(String serializedDocument, X509Certificate2 certificate, String uuid)\r\n at SPID.AspNetCore.Authentication.SpidHandler.RequestHandler.HandleRequest[T](T message, String messageId, X509Certificate2 certificate, String signOnUrl, RequestMethod method)\r\n at SPID.AspNetCore.Authentication.SpidHandler.HandleChallengeAsync(AuthenticationProperties properties)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.ChallengeAsync(AuthenticationProperties properties)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)\r\n at Microsoft.AspNetCore.Mvc.ChallengeResult.ExecuteResultAsync(ActionContext context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)\r\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)\r\n at SPID.AspNetCore.Authentication.Extensions.SpidSPMetadataMiddleware.Invoke(HttpContext context, IOptionsSnapshot`1 options, IServiceProvidersFactory serviceProvidersFactory)\r\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Expected behavior
La libreria dovrebbe funzionare anche con applicazioni che utilizzano la versione .NET 9.
Desktop:
OS: Windows 11 24H2
Browser: Chrome, Edge, Mozilla
Version: latest
Additional context
Deduco che il problema sia l'aggiornamento a .NET 9 dato che facendo un rollback alla versione 8.0.11 la libreria SPID funziona correttamente.
The text was updated successfully, but these errors were encountered:
Describe the bug
La libreria smette di funzionare dopo aver aggiornato a .NET 9.
To Reproduce
Aggiornando la mia applicazione a .NET 9 la libreria smette di funzionare dando il seguente errore:
Expected behavior
La libreria dovrebbe funzionare anche con applicazioni che utilizzano la versione .NET 9.
Desktop:
Additional context
Deduco che il problema sia l'aggiornamento a .NET 9 dato che facendo un rollback alla versione 8.0.11 la libreria SPID funziona correttamente.
The text was updated successfully, but these errors were encountered: