Skip to content

Commit 8dbe7a8

Browse files
authored
Remove some Apple handling from OpenSSL native shim
Remove some Apple handling from opensslshim.c since macOS no longer builds System.Security.Cryptography.Native.OpenSsl.
1 parent 2bdbc93 commit 8dbe7a8

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/native/libs/System.Security.Cryptography.Native/opensslshim.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,11 @@ TYPEOF(OPENSSL_gmtime) OPENSSL_gmtime_ptr;
2828
// x.x.x, considering the max number of decimal digits for each component
2929
#define MaxVersionStringLength 32
3030

31-
static void* volatile libssl = NULL;
31+
static void* volatile libssl = NULL;
3232

33-
#ifdef __APPLE__
34-
#define DYLIBNAME_PREFIX "libssl."
35-
#define DYLIBNAME_SUFFIX ".dylib"
36-
#define MAKELIB(v) DYLIBNAME_PREFIX v DYLIBNAME_SUFFIX
37-
#else
3833
#define LIBNAME "libssl.so"
3934
#define SONAME_BASE LIBNAME "."
4035
#define MAKELIB(v) SONAME_BASE v
41-
#endif
4236

4337
#if defined(TARGET_ARM) && defined(TARGET_LINUX)
4438
// We support ARM32 linux distros that have Y2038-compatible glibc (those which support _TIME_BITS).
@@ -70,18 +64,8 @@ static void OpenLibraryOnce(void)
7064

7165
if ((versionOverride != NULL) && strnlen(versionOverride, MaxVersionStringLength + 1) <= MaxVersionStringLength)
7266
{
73-
#ifdef __APPLE__
74-
char soName[sizeof(DYLIBNAME_PREFIX) + MaxVersionStringLength + sizeof(DYLIBNAME_SUFFIX)] =
75-
DYLIBNAME_PREFIX;
76-
77-
strcat(soName, versionOverride);
78-
strcat(soName, DYLIBNAME_SUFFIX);
79-
#else
8067
char soName[sizeof(SONAME_BASE) + MaxVersionStringLength] = SONAME_BASE;
81-
8268
strcat(soName, versionOverride);
83-
#endif
84-
8569
DlOpen(soName);
8670
}
8771

0 commit comments

Comments
 (0)