{"id":18544745,"url":"https://github.com/131/mitm-ca","last_synced_at":"2025-06-25T06:38:06.908Z","repository":{"id":57298466,"uuid":"103998044","full_name":"131/mitm-ca","owner":"131","description":"mitm ssl ca (dynamic cert generator)","archived":false,"fork":false,"pushed_at":"2018-01-11T15:13:53.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T17:54:45.970Z","etag":null,"topics":[],"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/131.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":"2017-09-18T22:22:01.000Z","updated_at":"2020-12-13T23:27:02.000Z","dependencies_parsed_at":"2022-09-06T04:20:53.877Z","dependency_job_id":null,"html_url":"https://github.com/131/mitm-ca","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/131/mitm-ca","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fmitm-ca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fmitm-ca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fmitm-ca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fmitm-ca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/131","download_url":"https://codeload.github.com/131/mitm-ca/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/131%2Fmitm-ca/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261820862,"owners_count":23214789,"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-11-06T20:17:28.459Z","updated_at":"2025-06-25T06:38:06.886Z","avatar_url":"https://github.com/131.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"CA pki forge (generate \u0026 cache cert for any hostname from a dummy CA)\n\n\n[![Version](https://img.shields.io/npm/v/mitm-ca.svg)](https://www.npmjs.com/package/mitm-ca)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\n\n\n# Usage (using FS driver)\n\n```\nconst CA = require('mitm-ca/fs');\n\n   // if not present, this will generate a dummy CA in cache folder\nconst vault = new CA('.CA_cache_folder');\n\n//to retrieve a cert/key pair (to use as SSL cert), juste use\n\nconst bundle = await vault.getBundle(\"somedomain.com\");\nconsole.log(\"Cert is\", bundle.cert);\nconsole.log(\"Key is\", bundle.key);\n\n// use it at https context if you want \n// file tree is now\n\n───.CA_cache_folder\n   ├───ca\n   │       server.crt \u003c root CA cert\n   │       server.rsa\n   │\n   └───somedomain.com\n           server.crt\n           server.rsa\n\n```\n\n# Usage (using RAM driver, no fs will be touched)\n\n```\nconst CA = require('mitm-ca');\n\n   // if not present, this will generate a dummy CA\nconst vault = new CA(); //optionnaly, you can specify a CA cert/key pair\n\n//to retrieve a cert/key pair (to use as SSL cert), juste use\n\nconst bundle = await vault.getBundle(\"somedomain.com\");\nconsole.log(\"Cert is\", bundle.cert);\nconsole.log(\"Key is\", bundle.key);\n\n\n//use await vault.getBundle(\"ca\") to retrieve ca if necessary\n```\n\n\n\n# Advanced usage / CLI usage\n```\nnpm install mitm-ca\nnpm install -g cnyks\n\n//generate a dummy ca and store it\ncnyks mitm-ca --ir://run=generateCA --ir://json \u003e ca.json\n\n```\n\n\n# Credits\n* [131](https://github.com/131)\n* inspired from joeferner/node-http-mitm-proxy/ca.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fmitm-ca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F131%2Fmitm-ca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F131%2Fmitm-ca/lists"}