{"id":16625825,"url":"https://github.com/aleclarson/cert-utils","last_synced_at":"2026-04-25T02:34:26.723Z","repository":{"id":66177578,"uuid":"104381000","full_name":"aleclarson/cert-utils","owner":"aleclarson","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-05T16:53:58.000Z","size":8,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-25T14:55:43.008Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aleclarson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-21T17:58:09.000Z","updated_at":"2017-09-24T13:20:35.000Z","dependencies_parsed_at":"2023-02-20T17:15:43.203Z","dependency_job_id":null,"html_url":"https://github.com/aleclarson/cert-utils","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"10f32080c12a6c525c33a79aec8f378a5d4ce8cb"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/aleclarson/cert-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcert-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcert-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcert-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcert-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleclarson","download_url":"https://codeload.github.com/aleclarson/cert-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Fcert-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32247874,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"online","status_checked_at":"2026-04-25T02:00:06.260Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-12T04:07:22.996Z","updated_at":"2026-04-25T02:34:26.706Z","avatar_url":"https://github.com/aleclarson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# cert-utils v1.2.0 ![stable](https://img.shields.io/badge/stability-stable-4EBA0F.svg?style=flat)\n\n\u003e npm install aleclarson/cert-utils#1.2.0\n\n```js\nconst certUtils = require('cert-utils');\n```\n\n### certUtils.der(cert)\n\nConvert a certificate to DER format.\n\n```js\ncertUtils.der(\n  fs.readFileSync('cert.pem')\n).then(cert =\u003e {\n  console.log(cert); // \u003c= `cert` is a Buffer object\n});\n```\n\n### certUtils.req(options)\n\nGenerate a CSR in either PEM or DER format.\n\n**Options:**\n- `key: string|buffer` The private key in PEM format\n- `format: string?` The output format (defaults to `PEM`)\n- `domain: string?` The validated domain, overrides `domains`\n- `domains: string|array?` The validated domain(s)\n- `subject: object?` The details embedded in the CSR, all keys are optional strings\n  - `email`\n  - `country`\n  - `state`\n  - `city`\n  - `company`\n  - `division`\n\n```js\ncertUtils.req({\n  key: fs.readFileSync('key.pem'),\n  domain: 'example.com',\n  subject: {\n    email: 'you@example.com',\n    country: 'US',\n    state: 'CA',\n    city: 'Palo Alto',\n    company: 'Google',\n  }\n}).then(csr =\u003e {\n  console.log(csr); // \u003c= `csr` is a Buffer object\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Fcert-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleclarson%2Fcert-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Fcert-utils/lists"}