File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,17 @@ Value GetMongoCryptSharedLibraryVersion(const CallbackInfo& args) {
8989#else
9090 void * lib = dlopen (filename.data (), RTLD_LAZY | RTLD_LOCAL);
9191 if (!lib) {
92+ std::string reported_error = dlerror ();
93+ if (reported_error.find (" libcrypto.so.1.1" ) != std::string::npos) {
94+ // This error happens for versions of the library that depend on libcrypto
95+ // (proxy libraries). In this case, we can't really know the version so
96+ // return unknown.
97+ Object result = Object::New (env);
98+ result[" version" ] = BigInt::New (env, 0 );
99+ result[" versionStr" ] = String::New (env, std::string (" mongo_crypt_v1-unknown" ));
100+ return result;
101+ }
102+
92103 throw Error::New (env, std::string (" dlopen() failed: " ) + dlerror ());
93104 }
94105 Cleanup cleanup ([&]() { dlclose (lib); });
You can’t perform that action at this time.
0 commit comments