diff options
Diffstat (limited to 'src/server/api')
| -rw-r--r-- | src/server/api/private/signup.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/api/private/signup.ts b/src/server/api/private/signup.ts index 63216019e9..af1aefda84 100644 --- a/src/server/api/private/signup.ts +++ b/src/server/api/private/signup.ts @@ -91,21 +91,21 @@ export default async (ctx: Koa.Context) => { return; } - const keyPair = await new Promise<string[]>((s, j) => + const keyPair = await new Promise<string[]>((res, rej) => generateKeyPair('rsa', { modulusLength: 4096, publicKeyEncoding: { - type: 'pkcs1', + type: 'spki', format: 'pem' }, privateKeyEncoding: { - type: 'pkcs1', + type: 'pkcs8', format: 'pem', cipher: undefined, passphrase: undefined } - } as any, (e, publicKey, privateKey) => - e ? j(e) : s([publicKey, privateKey]) + } as any, (err, publicKey, privateKey) => + err ? rej(err) : res([publicKey, privateKey]) )); let account!: User; |