Update openssl to 1.1.1n (#2334)

Update says: 'Security Advisory: one high severity fix' so probably
a good idea to include it.
This commit is contained in:
Hood Chatham 2022-03-31 20:40:12 -07:00 committed by GitHub
parent c27d2e712b
commit 389f8ff1d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 6 deletions

View File

@ -35,6 +35,8 @@ export PYODIDE_BASE_URL?=./
# For packages that depend on numpy.
# TODO: maybe move this somewhere else?
export NUMPY_LIB=$(HOSTINSTALLDIR)/numpy-wasm-libs
export OPEN_SSL_ROOT=$(PYODIDE_ROOT)/packages/openssl/build/openssl-1.1.1n/
# This environment variable is used for packages to detect if they are built
# for pyodide during build time

View File

@ -7,10 +7,10 @@ source:
sha256: 5a60d3780149e13b7a6ff7ad6526b38846354d11a15e21068e57073e29e19bed
build:
cflags: |
-I$(PYODIDE_ROOT)/packages/openssl/build/openssl-1.1.1m/include/
-I$(OPEN_SSL_ROOT)/include/
-Wno-implicit-function-declaration
ldflags: |
-L$(PYODIDE_ROOT)/packages/openssl/build/openssl-1.1.1m/dist/
-L$(OPEN_SSL_ROOT)/dist/
requirements:
run:
- openssl

View File

@ -1,10 +1,10 @@
package:
name: openssl
version: 1.1.1m
version: 1.1.1n
source:
url: https://www.openssl.org/source/openssl-1.1.1m.tar.gz
sha256: f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96
url: https://www.openssl.org/source/openssl-1.1.1n.tar.gz
sha256: 40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a
build:
sharedlibrary: true
script: |

View File

@ -10,7 +10,7 @@ build:
export DISTDIR=$(pwd)/dist
cd $CPYTHONBUILD
emcc $STDLIB_MODULE_CFLAGS -c Modules/socketmodule.c -o Modules/socketmodule.o
emcc $STDLIB_MODULE_CFLAGS -c Modules/_ssl.c -o Modules/_ssl.o -I$PYODIDE_ROOT/packages/openssl/build/openssl-1.1.1m/include/ \
emcc $STDLIB_MODULE_CFLAGS -c Modules/_ssl.c -o Modules/_ssl.o -I$OPEN_SSL_ROOT/include/ \
-DOPENSSL_THREADS # This declares that OPENSSL is threadsafe. We are single threaded so everything is threadsafe.
emcc Modules/_ssl.o -o $DISTDIR/_ssl.so $SIDE_MODULE_LDFLAGS
emcc Modules/socketmodule.o -o $DISTDIR/socketmodule.so $SIDE_MODULE_LDFLAGS

View File

@ -144,6 +144,7 @@ def get_bash_runner():
"SIDE_MODULE_CFLAGS",
"SIDE_MODULE_LDFLAGS",
"STDLIB_MODULE_CFLAGS",
"OPEN_SSL_ROOT",
]
} | {"PYODIDE": "1"}
if "PYODIDE_JOBS" in os.environ: