-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Description
On .NET 6 Preview 7, all calls to Interop.AppleCrypto.GetRandomBytes
fail on all current iOS devices with a DllNotFoundException: libcoreclr.so
. This call works fine on all iOS Simulator configurations, and all other platforms tested.
In my particular case, this call is occurring within various public authentication libraries, to securely generate random strings for PKCE codes (both IdentityModel and System.Identity.Client). When I rebuild these libraries to use System.Random() instead (which I'm sure breaks compliance), the app runs fine. Not able to tell via the stack trace what the underlying issue might be.
Configuration
.NET 6 Preview 7
MAUI Single Project
Blazor + MAUI.WebView
iOS ARM64 Build
IdentityModel and/or System.Identity.Client Package
Regression?
Unknown, but likely a regression from mono/mono
, as these packages work fine in Xamarin builds.
Other information
Relevant stack trace
System.DllNotFoundException: libcoreclr.so
at Interop.AppleCrypto.GetRandomBytes(Byte*, Inte32) in System.Security.Cryptography.Algorithms.dll
at System.Security.Cryptography.RandomNumberGenerator in System.Security.Cryptography.Algorithms.dll
at IdentityModel.CryptoRandom.CreateRandomKey in IdentityModel.dll