Skip to content

Commit

Permalink
fix: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
KEGustafsson committed Oct 20, 2023
1 parent a033f0a commit aa370cf
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,16 +356,20 @@ export function createCertificateOptions(
) {
const location = app.config.configPath ? app.config.configPath : './settings'
debug(`Creating certificate files in ${location}`)
generate([{ name: 'commonName', value: 'localhost' }], { days: 3650 }, function (err, pems) {
writeFileSync(keyFile, pems.private)
chmodSync(keyFile, '600')
writeFileSync(certFile, pems.cert)
chmodSync(certFile, '600')
cb(null, {
key: pems.private,
cert: pems.cert
})
});
generate(
[{ name: 'commonName', value: 'localhost' }],
{ days: 3650 },
function (err, pems) {
writeFileSync(keyFile, pems.private)
chmodSync(keyFile, '600')
writeFileSync(certFile, pems.cert)
chmodSync(certFile, '600')
cb(null, {
key: pems.private,
cert: pems.cert
})
}
)
}

export function requestAccess(
Expand Down

0 comments on commit aa370cf

Please sign in to comment.