Self Contained Publish & MacOS Store Submission (System.Security.Cryptography.Native.OpenSsl.dylib)
See original GitHub issueBackground
I am currently building a cross platform Electron app that uses a .NET Core and Kestrel for a localhost WebAPI for .NET Core to do the lifting & processing that will communicate over HTTP in the HTML/JS of the Electron application.
Building the application and running this works perfectly fine, however when the application is submitted to Apple’s AppStore for Review I get the following error from them.
Response from Apple’s App Review Team 🍎
Your app uses or references the following non-public APIs: Symbols: _EVP_sha384, _EVP_sha256, _EVP_sha512 From framework: @rpath/libcrypto.1.0.0.dylib In binary: >Contents/Resources/LogViewer.Server/bin/dist/osx/System.Security.Cryptography.Native.OpenSsl.dylib
As System.Security.Cryptography
is part of the .NET Core framework that I need to ship & bundle as part of the application (as I have no guarantee of .NET Core being installed on users machines)
Are there any suggestions on what I can do? Thanks 😃
Steps to reproduce ⚒
If you wish you can clone my repository for the project here https://github.com/warrenbuckley/Compact-Log-Format-Viewer/
In the LogViewer.Server
folder run the dotnet CLI publish command as follows:
dotnet publish --runtime osx-x64 --output bin/dist/osx
CSProj & Nuget References
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<!--<RuntimeIdentifiers>win10-x64;osx.10.11-x64</RuntimeIdentifiers>-->
<TargetFramework>netcoreapp2.2</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.0" />
<PackageReference Include="Serilog.Filters.Expressions" Version="2.0.0" />
<PackageReference Include="Serilog.Formatting.Compact.Reader" Version="1.0.3" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
</ItemGroup>
</Project>
Environment data
dotnet --info
output:
.NET Core SDK (reflecting any global.json):
Version: 2.2.104
Commit: 73f036d4ac
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/2.2.104/
Host (useful for support):
Version: 2.2.2
Commit: a4fd7b2c84
.NET Core SDKs installed:
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.302 [/usr/local/share/dotnet/sdk]
2.1.504 [/usr/local/share/dotnet/sdk]
2.2.104 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (7 by maintainers)
Top GitHub Comments
I guess you could try a trimmer, something like this:
But as you can see, it is currently a preview and hasn’t an official release, but maybe solves your problem.
We have lightup support for using OpenSSL as an optional component via RSAOpenSsl, DSAOpenSsl, ECDsaOpenSsl and ECDiffieHellmanOpenSsl.
Unless a project is using those types specifically OpenSSL won’t get touched.