Skip to content

Commit 945975f

Browse files
jonlucajoeferner
authored andcommitted
fix ca
1 parent c843d47 commit 945975f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/ca.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import FS from "fs";
22
import path from "path";
3-
import { pki, md } from "node-forge";
3+
import Forge from "node-forge";
4+
const { pki, md } = Forge;
45
import mkdirp from "mkdirp";
56
import async from "async";
67
import ErrnoException = NodeJS.ErrnoException;
@@ -127,12 +128,12 @@ const ServerExtensions = [
127128
},
128129
] as any[];
129130

130-
class CA {
131+
export class CA {
131132
baseCAFolder!: string;
132133
certsFolder!: string;
133134
keysFolder!: string;
134-
CAcert!: ReturnType<typeof pki.createCertificate>;
135-
CAkeys!: ReturnType<typeof pki.rsa.generateKeyPair>;
135+
CAcert!: ReturnType<typeof Forge.pki.createCertificate>;
136+
CAkeys!: ReturnType<typeof Forge.pki.rsa.generateKeyPair>;
136137

137138
static create(caFolder, callback) {
138139
const ca = new CA();

0 commit comments

Comments
 (0)