Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add steps about signing the binary in single-executable docs #46764

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions doc/api/single-executable-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,21 @@ tool, [postject][]:
$ cp $(command -v node) hello
```

3. Inject the JavaScript file into the copied binary by running `postject` with
3. Remove the signature of the binary:

* On macOS:

```console
$ codesign --remove-signature hello
```

* On Windows:

```console
$ signtool remove /s hello
```

4. Inject the JavaScript file into the copied binary by running `postject` with
the following options:

* `hello` - The name of the copy of the `node` executable created in step 2.
Expand Down Expand Up @@ -61,7 +75,21 @@ tool, [postject][]:
--macho-segment-name NODE_JS
```

4. Run the binary:
5. Sign the binary:

* On macOS:

```console
$ codesign --sign - hello
```

* On Windows:

```console
$ signtool sign /fd SHA256 hello
```

6. Run the binary:
```console
$ ./hello world
Hello, world!
Expand Down