{"id":13602560,"url":"https://github.com/kevinsawicki/signcode","last_synced_at":"2025-04-15T11:51:28.046Z","repository":{"id":52893318,"uuid":"56345525","full_name":"kevinsawicki/signcode","owner":"kevinsawicki","description":"Codesign Windows executables from a Mac","archived":false,"fork":false,"pushed_at":"2021-04-14T23:08:50.000Z","size":24126,"stargazers_count":42,"open_issues_count":11,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T14:06:56.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinsawicki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-15T19:42:47.000Z","updated_at":"2024-08-12T15:44:29.000Z","dependencies_parsed_at":"2022-09-06T22:22:16.560Z","dependency_job_id":null,"html_url":"https://github.com/kevinsawicki/signcode","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinsawicki%2Fsigncode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinsawicki%2Fsigncode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinsawicki%2Fsigncode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinsawicki%2Fsigncode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinsawicki","download_url":"https://codeload.github.com/kevinsawicki/signcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067221,"owners_count":21207392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T18:01:28.714Z","updated_at":"2025-04-15T11:51:28.028Z","avatar_url":"https://github.com/kevinsawicki.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# signcode\n\n[![Travis Build Status](https://travis-ci.org/kevinsawicki/signcode.svg?branch=master)](https://travis-ci.org/kevinsawicki/signcode)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)\n[![npm](https://img.shields.io/npm/v/signcode.svg)](https://www.npmjs.com/packages/signcode)\n[![downloads](https://img.shields.io/npm/dm/signcode.svg)](https://www.npmjs.com/packages/signcode)\n\nSign Windows executables and installers from a Mac.\n\nWorks with `.pem`, `.p12`, and `.pfx` code signing files.\n\nSigns with `sha1` and `sha256` signatures by default.\n\n## Installing\n\n```sh\nnpm install --save-dev signcode\n```\n\n## Using\n\n```js\nvar signcode = require('signcode')\n\nvar options = {\n  cert: '/Users/kevin/certs/cert.pem',\n  key: '/Users/kevin/certs/key.pem',\n  overwrite: true,\n  path: '/Users/kevin/apps/myapp.exe'\n}\n\nsigncode.sign(options, function (error) {\n  if (error) {\n    console.error('Signing failed', error.message)\n  } else {\n    console.log(options.path + ' is now signed')\n  }\n})\n\nsigncode.verify({ path: '/Users/kevin/apps/myapp.exe' }, function (error) {\n  if (error) {\n    console.error('Not signed', error.message)\n  } else {\n    console.log(options.path + ' is signed')\n  }\n})\n```\n\n### Signing Options\n\n| Name           | Type      | Required | Description                 |\n| :------------- | :-------- | :------- | :-------------------------- |\n| `cert`         | `String`  | Yes      | Path to a certificate file. |\n| `path`         | `String`  | Yes      | File path to executable to sign. |\n| `hash`         | `Array`   | No       | Signature types to sign the executable with. Defaults to `['sha1', 'sha256']`. |\n| `key`          | `String`  | No       | Path to a `.pem` key file. Only required if `cert` is a `.pem` file. |\n| `name`         | `String`  | No       | Product name to include in the signature. |\n| `overwrite`    | `Boolean` | No       | `true` to sign the executable in place, `false` to write the signed file at the same path but with `-signed` at the end of it. Defaults to `false`. |\n| `password`     | `String`  | No       | Password to the certificate or key. |\n| `passwordPath` | `String`  | No       | Path to a file containing the password for the certificate or key. |\n| `site`         | `String`  | No       | Website URL to include in the signature. |\n\n### Verification Options\n\n| Name           | Type      | Required | Description                 |\n| :------------- | :-------- | :------- | :-------------------------- |\n| `path`         | `String`  | Yes      | File path to executable to verify. |\n| `hash`         | `String`  | No       | Certificate fingerprint to expect on executable. |\n\n### Command Line Example\n\n```sh\nsigncode sign /Users/kevin/apps/myapp.exe \\\n  --cert /Users/kevin/certs/cert.p12 \\\n  --prompt \\\n  --name 'My App' \\\n  --url 'http://birthday.pizza'\nsigncode verify /Users/kevin/apps/myapp.exe\n```\n\nRun `signcode -h` to see all the supported options.\n\n## Cert helpers commands\n\nThese commands are helpful when working with certificates.\n\n### Create cert and key with no password\n\n```sh\nopenssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -nodes\n```\n\n### Create cert and key with a password\n\n```sh\nopenssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem\n```\n\n### Create a p12 with no password\n\n```sh\nopenssl pkcs12 -export -out ./test/fixtures/cert.p12 -inkey ./test/fixtures/key.pem -in ./test/fixtures/cert.pem\n```\n\n### Show fingerprint of a cert\n\n```sh\nopenssl x509 -noout -in ./test/fixtures/cert.pem -fingerprint -sha1\n```\n\n```sh\nopenssl x509 -noout -in ./test/fixtures/cert.pem -fingerprint -sha256\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinsawicki%2Fsigncode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinsawicki%2Fsigncode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinsawicki%2Fsigncode/lists"}