Skip to content

Commit 52bc180

Browse files
committed
Finish runtime verification before sealing framework signatures
1 parent 4696d57 commit 52bc180

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎build_python_framework_pkgs.zsh‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ codesign_framework() {
231231
/usr/bin/codesign -s "$identity" --deep "${cs_args[@]}" "$versioned/Resources/Python.app"
232232
/usr/bin/codesign -s "$identity" "${cs_args[@]}" "$versioned/Python"
233233

234+
/usr/bin/codesign --verify --deep --strict --verbose=2 "$framework_root"
234235
/usr/sbin/spctl -a -vvvv "$versioned/Python" || true
235236
}
236237

@@ -313,10 +314,12 @@ download_tool munki-pkg "$MP_SHA" \
313314
"$MP_ZIP" "$MP_BINDIR"
314315
build_framework
315316
install_sitecustomize
316-
codesign_framework
317+
# Runtime checks can create bytecode caches in the framework. Finish all such
318+
# writes before signing so they cannot invalidate its sealed resources.
317319
/usr/bin/env -u SSL_CERT_FILE -u SSL_CERT_DIR \
318320
"$TOOLSDIR/$TYPE/payload${FRAMEWORKDIR}/Python3.framework/Versions/${PYTHON_BIN_VERSION}/bin/python${PYTHON_BIN_VERSION}" \
319321
-I "${TOOLSDIR}/verify_framework.py"
322+
codesign_framework
320323
build_pkg
321324
notarize_and_staple
322325
zip_framework

0 commit comments

Comments
 (0)