You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently had a quick chat with @MylesBorins via 🐦 who encouraged me to post the issue here.
Tools like Little Flocker reports node with an invalid Developer ID whenever I run it on my machine. So I checked the node binary with codesign -vvvv $node_bin to see if it is code signed – which returns code object is not signed at all.
Is it possible to have the macOS Binaries signed by a Developer ID? I know that the .pkg/.tar.gz are signed, but would be great to have another layer of confidence.
@gibfahn That's cool. I just saw this here in the Makefile – does that mean that the macOS installer is getting signed as well? just checked it myself, and indeed the .pkg seems to be signed when inspected with pkgutil --check-signature
It looks like the package signing on macOS is done by the two scripts linked to from the Makefile as you pointed out. osx-codesign.sh signs the binary, and osx-productsign.sh signs the pkg file.
Are you sure the binaries aren't signed? I ran codesign -dvvv ./node on a node binary I built locally, and I get:
➜ codesign -dvvv ./node
./node: code object is not signed at all
If I run the same thing on a node binary from the pkg or the tar.gz, I get:
@gibfahn Thanks for the detailed response. Yeah, running codesign -dvvv actually gave me the same output as yours.
Not sure why then, but Little Flocker still tells me that the 'Code Signature Invalid'. Tracking it down a bit … it seems like its SecStaticCodeCheckValidityWithErrors returns a errSecCSSignatureInvalid error.
I am reopening this issues because I have done some more tests and been monitoring this.
I downloaded the node-v7.9.0-darwin-x64.tar.gz, unzipped it and ran
→ codesign -dvvv ./node
./node: code object is not signed at all
When downloading the node-v7.9.0.pkg and running
pkgutil --expand node-v7.9.0.pkg nodepkg
cd nodepkg/local.pkg
tar -xvf Payload
cd bin
codesign -vvvv ./node
→ bin codesign -vvvv ./node
./node: valid on disk
./node: satisfies its Designated Requirement
There seems to be a regression here or the .tar.gz is not being codesigned at all.
Any clues? Can you test it this way as well @gibfahn?
Activity
gibfahn commentedon Mar 20, 2017
I assume this would be something we could do for at least windows as well?
mscdex commentedon Mar 20, 2017
@gibfahn I thought Windows binaries already were being signed, hence the 'nosign' command-line option for vcbuild?
gibfahn commentedon Mar 20, 2017
Yeah okay, we are signing both the
node.exebinary and the.msiinstaller. Didn't realise we were doing both.raphaelokon commentedon Mar 20, 2017
@gibfahn That's cool. I just saw this here in the Makefile –
does that mean that the macOS installer is getting signed as well?just checked it myself, and indeed the.pkgseems to be signed when inspected withpkgutil --check-signatureraphaelokon commentedon Mar 22, 2017
If I can do anything to push this forward please let me know.
gibfahn commentedon Mar 22, 2017
It looks like the package signing on macOS is done by the two scripts linked to from the Makefile as you pointed out. osx-codesign.sh signs the binary, and osx-productsign.sh signs the pkg file.
Are you sure the binaries aren't signed? I ran
codesign -dvvv ./nodeon a node binary I built locally, and I get:If I run the same thing on a node binary from the pkg or the tar.gz, I get:
I guess cc/ @rvagg as he seems to be the only person to have ever touched those files.
gibfahn commentedon Mar 22, 2017
Also cc/ @nodejs/platform-macos
gibfahn commentedon Mar 22, 2017
I didn't actually install the pkg (don't want to mess with the multiple versions of node I have installed already), I just did:
curl -O https://nodejs.org/dist/v6.10.1/node-v6.10.1.pkg pkgutil --expand node-v6.10.1.pkg nodepkg cd nodepkg/local.pkg tar -xf Payload codesign -vvvv bin/nodeOutput:
➜ bin codesign -vvvv ./node ~/nodepkg/local.pkg/bin ./node: valid on disk ./node: satisfies its Designated Requirementraphaelokon commentedon Mar 22, 2017
@gibfahn Thanks for the detailed response. Yeah, running
codesign -dvvvactually gave me the same output as yours.Not sure why then, but Little Flocker still tells me
that the'Code Signature Invalid'. Tracking it down a bit … it seems like itsSecStaticCodeCheckValidityWithErrorsreturns aerrSecCSSignatureInvaliderror.raphaelokon commentedon Mar 22, 2017
According to the Code Signing Guide this test mimics what macOS Gatekeeper does
→ codesign --verify --deep --strict --verbose=2 `which node`Expected and actual result:
So maybe this is just a local issue with Little Flocker.
raphaelokon commentedon Apr 12, 2017
I am reopening this issues because I have done some more tests and been monitoring this.
I downloaded the
node-v7.9.0-darwin-x64.tar.gz, unzipped it and ranWhen downloading the
node-v7.9.0.pkgand runningThere seems to be a regression here or the
.tar.gzis not being codesigned at all.Any clues? Can you test it this way as well @gibfahn?
17 remaining items
raphaelokon commentedon Jul 12, 2017
Cheers @evanlucas – and sorry for keeping bugging you guys :D
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS
build: codesign tarball binary on macOS