Skip to content

Commit 4169458

Browse files
committed
Add readme to debug-certificate-manager.
1 parent c2e2bab commit 4169458

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# @microsoft/debug-certificate-manager
2+
3+
## Installation
4+
5+
`npm install @microsoft/debug-certificate-manager --save-dev`
6+
7+
## Overview
8+
9+
This library contains utilities for managing debug certificates in a development server environment. It provides functions to generate, self-sign, trust, and untrust .pem certificates for both Windows and Mac OS. It will also generate self-signed certificates on other OS's, but the user must manually trust and untrust them.
10+
11+
[![npm version](https://badge.fury.io/js/%40microsoft%2Fdebug-certificate-manager.svg)](https://badge.fury.io/js/%40microsoft%2Fdebug-certificate-manager)
12+
[![Build Status](https://travis-ci.org/Microsoft/debug-certificate-manager.svg?branch=master)](https://travis-ci.org/Microsoft/debug-certificate-manager) [![Dependencies](https://david-dm.org/Microsoft/debug-certificate-manager.svg)](https://david-dm.org/Microsoft/debug-certificate-manager)
13+
14+
15+
## CertificateStore
16+
17+
The CertificateStore class follows a singleton pattern and provides accessors and mutators for the certificate data stored in `.rushstack-serve-data`.
18+
19+
Retrieve an instance with `CertificateStore.instance`.
20+
21+
## ensureCertificate
22+
23+
Get the dev certificate from the store, or optionally, generate a new one and trust it if one does not exist in the store. Returns a certificate object following the `ICertificate` interface.
24+
25+
```typescript
26+
export interface ICertificate {
27+
pemCertificate: string | undefined;
28+
pemKey: string | undefined;
29+
}
30+
```
31+
32+
## untrustCertificate
33+
34+
Attempts to locate a previously generated debug certificate and untrust it. Returns a `boolean` value to denote success.
35+
36+
## API Documentation
37+
38+
Complete API documentation for this package: https://rushstack.io/pages/api/debug-certificate-manager/
39+
40+
# License
41+
42+
MIT (http://www.opensource.org/licenses/mit-license.php)

0 commit comments

Comments
 (0)