@@ -42,10 +42,10 @@ class HashVerify extends stream.Transform {
4242}
4343
4444// currently this only needs to be done on linux
45- const applyOpenSSLPatches = async ( buildCwd ) => {
45+ const applyOpenSSLPatches = async ( buildCwd , operatingSystem ) => {
4646 try {
4747 for ( const patchFilename of await fse . readdir ( opensslPatchPath ) ) {
48- if ( patchFilename . split ( "." ) . pop ( ) === "patch" ) {
48+ if ( patchFilename . split ( "." ) . pop ( ) === "patch" && patchFilename . split ( "-" ) [ 1 ] === operatingSystem ) {
4949 console . log ( `applying ${ patchFilename } ` ) ;
5050 await execPromise ( `patch -up0 -i ${ path . join ( opensslPatchPath , patchFilename ) } ` , {
5151 cwd : buildCwd
@@ -80,6 +80,8 @@ const buildDarwin = async (buildCwd, macOsDeploymentTarget) => {
8080 cwd : buildCwd
8181 } , { pipeOutput : true } ) ;
8282
83+ await applyOpenSSLPatches ( buildCwd , "linux" ) ;
84+
8385 // only build the libraries, not the tests/fuzzer or apps
8486 await execPromise ( "make build_libs" , {
8587 cwd : buildCwd
@@ -117,7 +119,7 @@ const buildLinux = async (buildCwd) => {
117119 cwd : buildCwd
118120 } , { pipeOutput : true } ) ;
119121
120- await applyOpenSSLPatches ( buildCwd ) ;
122+ await applyOpenSSLPatches ( buildCwd , "linux" ) ;
121123
122124 // only build the libraries, not the tests/fuzzer or apps
123125 await execPromise ( "make build_libs" , {
@@ -136,6 +138,8 @@ const buildLinux = async (buildCwd) => {
136138} ;
137139
138140const buildWin32 = async ( buildCwd ) => {
141+ await applyOpenSSLPatches ( buildCwd , "win32" ) ;
142+
139143 const vcvarsallArch = process . arch === "x64" ? "x64" : "x86" ;
140144 const programFilesPath = ( vcvarsallArch === "x64"
141145 ? process . env [ "ProgramFiles(x86)" ]
0 commit comments