Skip to content

Commit

Permalink
Merge pull request #319 from dreusel/fix-FIPS_mode-undefined-reference
Browse files Browse the repository at this point in the history
fix: remove code using FIPS_mode which is not available on all distros
  • Loading branch information
DavidVujic authored Sep 17, 2022
2 parents f86ef1f + 1efafdb commit 39282d6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions deps/no-fipsmode.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diff -ur -p0 deps/zookeeper-client-c/src/zookeeper.c deps-patched/zookeeper-client-c/src/zookeeper.c
--- deps/zookeeper-client-c/src/zookeeper.c 2022-09-10 16:36:21.122958700 +0200
+++ deps-patched/zookeeper-client-c/src/zookeeper.c 2022-09-10 16:32:05.092796200 +0200
@@ -2595,5 +2594,0 @@ static int init_ssl_for_socket(zsock_t *
- if (FIPS_mode() == 0) {
- LOG_INFO(LOGCALLBACK(zh), "FIPS mode is OFF ");
- } else {
- LOG_INFO(LOGCALLBACK(zh), "FIPS mode is ON ");
- }
1 change: 1 addition & 0 deletions scripts/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const variables = {
sourceFolder: `${rootFolder}/deps/zookeeper-client-c`,
downloadedFileName,
isWindows,
isLinux: process.platform === 'linux',
isVerbose: !!process.env.ZK_INSTALL_VERBOSE,
};

Expand Down
2 changes: 2 additions & 0 deletions scripts/prepublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ function applyPatches() {
shell.sed('-i', '#include "zookeeper_log.h"', '#include "zookeeper_log.h"\n#include "winport.h"\n', `${destination}/zk_log.c`);
shell.sed('-i', '#include "zookeeper.h"', '#include "winport.h"\n#include "zookeeper.h"\n', `${destination}/zk_adaptor.h`);
shell.sed('-i', '#include "zk_adaptor.h"', '#include "zk_adaptor.h"\n#include "winport.h"\n', `${destination}/zookeeper.c`);
} else if (env.isLinux) {
shell.exec(`patch -d ${env.rootFolder} -p0 --forward < ${env.workFolder}/no-fipsmode.patch`);
}
}

Expand Down

0 comments on commit 39282d6

Please sign in to comment.