Skip to content

Commit 35b1dd2

Browse files
authored
FreeBSD: Add suffix numbering for OpenSSL3.5
OpenSSL has been updated to 3.5.4 under FreeBSD 15.0
1 parent 506b9a1 commit 35b1dd2

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,20 @@ static void OpenLibraryOnce(void)
7575
// Android OpenSSL has no soname
7676
DlOpen(LIBNAME);
7777
}
78-
#endif
79-
78+
#elif defined(__FreeBSD__)
79+
// The ports version of OpenSSL is used over base where possible
8080
if (libssl == NULL)
8181
{
82-
// Prefer OpenSSL 3.x
83-
DlOpen(MAKELIB("3"));
82+
// OpenSSL 3.5 from ports
83+
DlOpen(MAKELIB("17"));
8484
}
8585

8686
if (libssl == NULL)
8787
{
88-
DlOpen(MAKELIB("1.1"));
88+
// OpenSSL 3.5 from base as found in FreeBSD 15.0
89+
DlOpen(MAKELIB("35"));
8990
}
9091

91-
#ifdef __FreeBSD__
92-
// The ports version of OpenSSL is used over base where possible
9392
if (libssl == NULL)
9493
{
9594
// OpenSSL 3.0 from ports
@@ -114,6 +113,16 @@ static void OpenLibraryOnce(void)
114113
}
115114
#endif
116115

116+
if (libssl == NULL)
117+
{
118+
// Prefer OpenSSL 3.x
119+
DlOpen(MAKELIB("3"));
120+
}
121+
122+
if (libssl == NULL)
123+
{
124+
DlOpen(MAKELIB("1.1"));
125+
}
117126
}
118127

119128
static pthread_once_t g_openLibrary = PTHREAD_ONCE_INIT;

0 commit comments

Comments
 (0)