diff --git a/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertFreeCRLContext.cs b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertFreeCRLContext.cs
new file mode 100644
index 00000000000000..5920fe91deca4f
--- /dev/null
+++ b/src/libraries/Common/src/Interop/Windows/Crypt32/Interop.CertFreeCRLContext.cs
@@ -0,0 +1,15 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+ internal static partial class Crypt32
+ {
+ // https://learn.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-certfreecrlcontext
+ [LibraryImport(Libraries.Crypt32)]
+ public static partial int CertFreeCRLContext(IntPtr certContext);
+ }
+}
diff --git a/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs b/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs
index 299149a309f3d9..0cbac4af54c19b 100644
--- a/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs
+++ b/src/libraries/Common/src/Interop/Windows/Wldap32/Interop.Ldap.cs
@@ -190,9 +190,6 @@ internal static partial class Ldap
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial int ldap_control_free(IntPtr control);
- [LibraryImport("Crypt32.dll", EntryPoint = "CertFreeCRLContext")]
- public static partial int CertFreeCRLContext(IntPtr certContext);
-
[LibraryImport(Libraries.Wldap32, EntryPoint = "ldap_result2error")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial int ldap_result2error(ConnectionHandle ldapHandle, IntPtr result, int freeIt);
diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
index a14b7fa4d14b8d..efdc467c3600a6 100644
--- a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
+++ b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj
@@ -69,6 +69,7 @@
+
diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs
index 813005c5ecb72b..589f11b88af736 100644
--- a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs
+++ b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapSessionOptions.Windows.cs
@@ -8,7 +8,7 @@ namespace System.DirectoryServices.Protocols
{
public partial class LdapSessionOptions
{
- private static void PALCertFreeCRLContext(IntPtr certPtr) => Interop.Ldap.CertFreeCRLContext(certPtr);
+ private static void PALCertFreeCRLContext(IntPtr certPtr) => Interop.Crypt32.CertFreeCRLContext(certPtr);
public bool SecureSocketLayer
{