Skip to content

X509Chain.Build throwing exception on macOS/iOS 26.4 betas #124552

@filipnavara

Description

@filipnavara

We captured numerous occurrences of this error on the latest beta versions of macOS/iOS:

System.Security.Cryptography.Interop+AppleCrypto+AppleCommonCryptoCryptographicException: Unable to decode the provided data.
    at System.Security.Cryptography.X509Certificates.SecTrustChainPal.Execute(:0)
    at System.Security.Cryptography.X509Certificates.ChainPal.BuildChain(:0)
    at System.Security.Cryptography.X509Certificates.X509Chain.Build(:0)
    at Foundation.NSUrlSessionHandler+ServerCertificateCustomValidationCallbackHelper.EvaluateSslPolicyErrors(:0)
    at Foundation.NSUrlSessionHandler+ServerCertificateCustomValidationCallbackHelper.Invoke(:0)
    at Foundation.NSUrlSessionHandler.TryInvokeServerCertificateCustomValidationCallback(:0)
    at Foundation.NSUrlSessionHandler+NSUrlSessionHandlerDelegate.DidReceiveChallengeImpl(:0)
    at Foundation.NSUrlSessionHandler+NSUrlSessionHandlerDelegate.DidReceiveChallenge(:0)
    at InvokeStub_NSUrlSessionHandlerDelegate.DidReceiveChallenge(:0)
    at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(:0)
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(:0)
    at ObjCRuntime.Runtime.InvokeMethod(:0)
    at ObjCRuntime.Runtime.InvokeMethod(:0)
    at ObjCRuntime.Runtime.bridge_runtime_invoke_method(:0)

We don't have a repro yet, but I am posting it anyway as a heads up that this is something that may eventually require attention. In our case we are still building with .NET 9 runtime on those platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions