Skip to content

Commit 263b76e

Browse files
committed
fix dll loading macos
1 parent cde8f97 commit 263b76e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/S7CommPlusDriver/OpenSSL/Native.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private static IntPtr DllImportResolver(string libraryName, Assembly assembly, D
4343
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
4444
return NativeLibrary.Load(Path.Combine("runtimes", "win-arm64", "native", "libcrypto-3-arm64.dll"), assembly, searchPath);
4545
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
46-
return NativeLibrary.Load(Path.Combine("runtimes", "osx-arm64", "native", "libcrypto.3.dylib"), assembly, searchPath);
46+
return NativeLibrary.Load("libcrypto.3.dylib", assembly, searchPath);
4747
return IntPtr.Zero;
4848
}
4949

@@ -56,7 +56,7 @@ private static IntPtr DllImportResolver(string libraryName, Assembly assembly, D
5656
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
5757
return NativeLibrary.Load(Path.Combine("runtimes", "win-arm64", "native", "libssl-3-arm64.dll"), assembly, searchPath);
5858
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
59-
return NativeLibrary.Load(Path.Combine("runtimes", "osx-arm64", "native", "libssl.3.dylib"), assembly, searchPath);
59+
return NativeLibrary.Load("libssl.3.dylib", assembly, searchPath);
6060
return IntPtr.Zero;
6161
}
6262

0 commit comments

Comments
 (0)