ldap: provide version for "legacy" ldap as well

It displays in version output as WinLDAP and LDAP/1, compared to
OpenLDAP/[version] for the OpenLDAP backend code.

Closes #19808
This commit is contained in:
Daniel Stenberg 2025-12-02 14:13:55 +01:00
parent b30c1b97b9
commit 3e2a946926
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 35 additions and 27 deletions

View file

@ -1037,6 +1037,15 @@ static void ldap_free_urldesc_low(LDAPURLDesc *ludp)
}
#endif /* !HAVE_LDAP_URL_PARSE */
void Curl_ldap_version(char *buf, size_t bufsz)
{
#ifdef USE_WIN32_LDAP
curl_msnprintf(buf, bufsz, "WinLDAP");
#else
curl_msnprintf(buf, bufsz, "LDAP/1");
#endif
}
#if defined(__GNUC__) && defined(__APPLE__)
#pragma GCC diagnostic pop
#endif