-
Notifications
You must be signed in to change notification settings - Fork 209
PHPC-2367: Add SSPI SASL, drop Cyrus on Windows #1837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
570d3ec
3752cd6
b6042ee
f6feb5e
6aac94c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,7 @@ function MONGODB_ADD_SOURCES(dir, file_list) | |
} | ||
|
||
ARG_ENABLE("mongodb", "MongoDB support", "no"); | ||
ARG_WITH("mongodb-sasl", "MongoDB: Build against Cyrus-SASL", "yes"); | ||
ARG_WITH("mongodb-sasl", "MongoDB: Build with SSPI SASL", "yes"); | ||
ARG_WITH("mongodb-client-side-encryption", "MongoDB: Enable client-side encryption", "yes"); | ||
|
||
if (PHP_MONGODB != "no") { | ||
|
@@ -232,15 +232,21 @@ if (PHP_MONGODB != "no") { | |
WARNING("mongodb libopenssl support not enabled, libs not found"); | ||
} | ||
|
||
// TODO: Support building with native GSSAPI (SSPI) on Windows | ||
if (PHP_MONGODB_SASL != "no" && | ||
CHECK_LIB("libsasl.lib", "mongodb", PHP_MONGODB) && | ||
CHECK_HEADER_ADD_INCLUDE("sasl/sasl.h", "CFLAGS_MONGODB")) { | ||
|
||
mongoc_opts.MONGOC_ENABLE_SASL = 1; | ||
mongoc_opts.MONGOC_ENABLE_SASL_CYRUS = 1; | ||
|
||
// Referenced by _mongoc_cyrus_verifyfile_cb in mongoc-cyrus.c on Windows | ||
ADD_FLAG("CFLAGS_MONGODB", "/D MONGOC_CYRUS_PLUGIN_PATH_PREFIX=NULL"); | ||
// TODO 3.0: Remove warning on "yes" as it implies "sspi" | ||
if (PHP_MONGODB_SASL == "yes") { | ||
WARNING("Cyrus SASL support for Windows was removed. Falling back to SSPI."); | ||
} | ||
|
||
if (PHP_MONGODB_SASL == "yes" || PHP_MONGODB_SASL == "sspi") { | ||
mongoc_opts.MONGOC_ENABLE_SASL_SSPI = 1; | ||
} else { | ||
WARNING("mongodb sasl support not enabled, unknown value for PHP_MONGODB_SASL: " + PHP_MONGODB_SASL); | ||
} | ||
|
||
if (CHECK_FUNC_IN_HEADER("sasl/sasl.h", "sasl_client_done")) { | ||
|
||
mongoc_opts.MONGOC_HAVE_SASL_CLIENT_DONE = 1; | ||
|
Uh oh!
There was an error while loading. Please reload this page.