# myca

> Create Self-signed CA certificate for development use and issue server or client certificates, generated using openssl

Latest version **5.1.0** (published 2023-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install myca
pnpm add myca
yarn add myca
bun add myca
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.1.0 |
| Published | 2023-08-21 |
| First published | 2018-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=16.13.0 |
| Dependencies | 2 |
| Unpacked size | 248.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | waiting |
| Maintainers | waiting |
| Keywords | CA, cert, csr, certificate, ec, ecc, Elliptic Curve, openssl, pkcs, PKCS8, PKCS12, pfx, p12, P-256, P-384, prime256v1, secp384r1, RSA, self signed, SAN, SSL, TLS, x509 |

## Links

- npm: https://www.npmjs.com/package/myca
- Repository: https://github.com/waitingsong/node-myca
- Homepage: https://github.com/waitingsong/node-myca#readme
- Issues: https://github.com/waitingsong/node-myca/issues
- npm.io page: https://npm.io/package/myca

## Dependencies (2)

- [zx](https://npm.io/package/zx.md) 7
- [@waiting/shared-core](https://npm.io/package/@waiting/shared-core.md) ^21.5.0

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 5.1.0 (latest) — 2023-08-21
- 5.0.0 — 2023-07-26
- 4.1.6 — 2023-07-24
- 4.1.4 — 2023-07-24
- 4.1.3 — 2023-07-21
- 4.1.2 — 2023-07-21
- 4.1.1 — 2023-07-21
- 4.1.0 — 2023-07-21
- 4.0.4 — 2023-07-21
- 4.0.3 — 2023-07-20
- 4.0.2 — 2023-07-20
- 4.0.1 — 2023-07-20
- 4.0.0 — 2023-07-20
- 3.2.0 — 2019-01-23
- 3.1.1 — 2019-01-22
- … 35 more at https://npm.io/package/myca/versions

## README

# myca

Create my CA center, generate a self signed x509 certificate, issue server certificate from node.js via openssl. Multiple center supported. RSA, EC(P-256, P-384) supported.


[![GitHub tag](https://img.shields.io/github/tag/waitingsong/node-myca.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![](https://img.shields.io/badge/lang-TypeScript-blue.svg)]()
[![ci](https://github.com/waitingsong/node-myca/workflows/ci/badge.svg)](https://github.com/waitingsong/node-myca/actions?query=workflow%3A%22ci%22)
[![codecov](https://codecov.io/github/waitingsong/node-myca/branch/main/graph/badge.svg?token=wTaSMKz3Ne)](https://codecov.io/github/waitingsong/node-myca)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)


## Installing
```bash
npm install --save myca
```

## CLI
- [myca-cli](https://www.npmjs.com/package/myca-cli)
- Installing by `npm i -g myca-cli`
- Command help
  - `myca`
  - `myca initca -h`
  - `myca issue -h`
- Example
  ```sh
  myca initca --days=10950 --alg=ec --pass=capass \
    --cn="Root CA" --ou="waitingsong.com" --o="waitingsong" --l="CD" --c=CN \
  ```

  ```sh
  myca issue --kind=server --days=3650 --pass=mypass \
    --cn="waitingsong.com" --o="waitingsong" --c=CN --caKeyPass=capass \
    --centerName=default --alg=ec \
    --ips="127.0.0.1, 192.168.0.1" \
    --SAN="localhost" 
  ```

  ```sh
  myca issue --kind=client --days=3650 --pass=mypass \
    --cn="client" --o="it" --c=CN --caKeyPass=capss \
    --centerName=default --alg=ec 
  ```


## Usage
- Initialize default center
  ```ts
  import { initDefaultCenter } from 'myca'

  await initDefaultCenter()
  ```


## Packages

| Package      | Version                |
| ------------ | ---------------------- |
| [`myca`]     | [![main-svg]][main-ch] |
| [`myca-cli`] | [![cli-svg]][cli-ch]   |



## License
[MIT](LICENSE)


### Languages
- [English](README.md)
- [中文](README.zh-CN.md)

<br>

[`myca`]: https://github.com/waitingsong/node-myca/tree/main/packages/myca
[main-svg]: https://img.shields.io/npm/v/myca.svg?maxAge=7200
[main-ch]: https://github.com/waitingsong/node-myca/tree/main/packages/myca/CHANGELOG.md

[`myca-cli`]: https://github.com/waitingsong/node-myca/tree/main/packages/myca-cli
[cli-svg]: https://img.shields.io/npm/v/myca-cli.svg?maxAge=7200
[cli-ch]: https://github.com/waitingsong/node-myca/tree/main/packages/myca-cli/CHANGELOG.md

---
_Source: https://npm.io/package/myca · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
