2019-10-08 21:13:13 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
async function run() {
|
|
|
|
var Keypairs = require('@root/keypairs');
|
|
|
|
|
|
|
|
var certKeypair = await Keypairs.generate({ kty: 'RSA' });
|
2019-10-21 21:22:07 +00:00
|
|
|
console.log(certKeypair);
|
2019-10-08 21:13:13 +00:00
|
|
|
var pem = await Keypairs.export({
|
|
|
|
jwk: certKeypair.private,
|
|
|
|
encoding: 'pem'
|
|
|
|
});
|
|
|
|
console.log(pem);
|
|
|
|
}
|
|
|
|
|
|
|
|
run();
|