-
Notifications
You must be signed in to change notification settings - Fork 1
/
tls.ts
24 lines (23 loc) · 775 Bytes
/
tls.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/**
* X509KeyPair holds a public/private key of PEM encoded data.
*/
export type X509KeyPair = {
key: string;
cert: string;
};
export type TLSConfig = boolean | {
/**
* Controls whether a client verifies the server's certificate chain and
* host name. If set true, crypto/tls accepts any certificate presented
* by the server and any host name in that certificate. In this mode, TLS
* is susceptible to machine-in-the-middle attacks unless custom verification
* is used. This should be used only for testing.
*/
insecureSkipVerify?: boolean;
keyPair?: X509KeyPair;
/**
* Defines the set of root certificate authority that clients use when
* verifying server certificates. If not set, use the host's root CA set.
*/
ca?: string;
};