diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2020-01-20 04:51:44 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2020-01-20 04:51:44 +0900 |
| commit | 46aaf8fa9a30cbe1c1410e59e70caa9e202c4cf0 (patch) | |
| tree | bed7def06f02315a65a3eb736e70c5c8fa143935 /src/server/api | |
| parent | Fix syuilo#5729 (#5732) (diff) | |
| download | sharkey-46aaf8fa9a30cbe1c1410e59e70caa9e202c4cf0.tar.gz sharkey-46aaf8fa9a30cbe1c1410e59e70caa9e202c4cf0.tar.bz2 sharkey-46aaf8fa9a30cbe1c1410e59e70caa9e202c4cf0.zip | |
AP Actorの鍵とkeyIdのフォーマットの変更 (#5733)
* Node PKCS#8
* keyIdを#main-key形式に
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; |