{"id":17225095,"url":"https://github.com/mikekovarik/cert-store","last_synced_at":"2025-04-14T00:52:10.229Z","repository":{"id":57196138,"uuid":"166594777","full_name":"MikeKovarik/cert-store","owner":"MikeKovarik","description":"🔐 Install, check and delete trusted root certificates.","archived":false,"fork":false,"pushed_at":"2019-04-04T08:05:13.000Z","size":25,"stargazers_count":7,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T14:55:15.464Z","etag":null,"topics":["cert","certificate","certificate-store","crt","pem","store"],"latest_commit_sha":null,"homepage":"","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/MikeKovarik.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}},"created_at":"2019-01-19T21:20:28.000Z","updated_at":"2024-01-19T10:26:03.000Z","dependencies_parsed_at":"2022-09-16T12:12:49.504Z","dependency_job_id":null,"html_url":"https://github.com/MikeKovarik/cert-store","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeKovarik%2Fcert-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeKovarik%2Fcert-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeKovarik%2Fcert-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeKovarik%2Fcert-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikeKovarik","download_url":"https://codeload.github.com/MikeKovarik/cert-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804781,"owners_count":21164131,"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":["cert","certificate","certificate-store","crt","pem","store"],"created_at":"2024-10-15T04:12:43.277Z","updated_at":"2025-04-14T00:52:10.192Z","avatar_url":"https://github.com/MikeKovarik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cert-store\n\n🔐 Install, check and delete trusted root certificates.\n\n## Installation\n\n```js\nnpm install cert-store\n```\n\n## Usage\n\nUsing path to `.crt`, `.cert`, or `.pem` file.\n\n```js\nimport certstore from 'cert-store'\n\nvar certPath = './testsrv.root-ca.crt'\n// installing certificate\nawait certstore.install(certPath)\n// checking if cert is already installed\nconsole.log('installed', await certstore.isInstalled(certPath))\n// deleting certificate\nawait certstore.delete(certPath)\n```\n\nUsing pem string.\n\n```js\nimport certstore from 'cert-store'\n\nvar pem = `\n-----BEGIN CERTIFICATE-----\nMIIB8TCCAVqgAwIBAgIJF7pYoC10fT2eMA0GCSqGSIb3DQEBCwUAMCsxKTAnBgNV\n...\nZlMu5/XGsj/RuQx8iwEMHokKvEkW\n-----END CERTIFICATE-----\n`\n\n// Install certificate from pem string.\nawait certstore.install(pem)\n// Check for existence or delete (uses certificate's serial number).\nvar installed = await certstore.isInstalled(pem)\nawait certstore.delete(pem)\n```\n\nUsing node-forge object.\n\n```js\nimport forge from 'node-forge'\nimport certstore from 'cert-store'\n\n// Create your cert with node-forge.\n// WARNING: this is incomplete example, look at node-forge's readme for more info.\nvar keys = pki.rsa.generateKeyPair(2048)\nvar cert = pki.createCertificate()\ncert.publicKey = keys.publicKey\n// certificate has to have UNIQUE serialNumber.\ncert.serialNumber = '0123456789'\ncert.validity.notBefore = new Date()\ncert.validity.notAfter = new Date()\ncert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1)\ncert.setSubject(...)\ncert.setIssuer(...)\n...\ncert.sign(keys.privateKey)\n\n// use the cert object as argument.\nawait certstore.install(cert)\n```\n\n## Help needed\n\nThis project was developed and tested on Windows and WSL Ubuntu. Mac is yet to be tested. If you're a mac user please submit issues, feedback and PRs.\n\n## License\n\nMIT, Mike Kovařík, Mutiny.cz","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikekovarik%2Fcert-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikekovarik%2Fcert-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikekovarik%2Fcert-store/lists"}