Skip to content

Commit

Permalink
chore: update certificates resource
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Nov 16, 2024
1 parent 84312fe commit 8206439
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/certificates.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const resource = await externalResources.add( "softvisio-node/core/resources/cer

const defaultHttpsDomain = "local.softvisio.net",
defaultHttpsCertificate = `${ resource.location }/${ defaultHttpsDomain }/certificate.pem`,
defaultHttpsKey = `${ resource.location }/${ defaultHttpsDomain }/key.pem`;
defaultHttpsPrivateKey = `${ resource.location }/${ defaultHttpsDomain }/private-key.pem`;

const DEFAULT_PRIVATE_KEY_SIZE = 4096;

Expand All @@ -22,8 +22,8 @@ class Certificates {
return defaultHttpsCertificate;
}

get defaultHttpsKey () {
return defaultHttpsKey;
get defaultHttpsPrivateKey () {
return defaultHttpsPrivateKey;
}

// public
Expand Down
2 changes: 1 addition & 1 deletion lib/external-resources/certificates.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class Datasets extends ExternalResourceBuilder {
"recursive": true,
} );

fs.writeFileSync( `${ location }/${ DOMAIN }/key.pem`, res.data.privateKey );
fs.writeFileSync( `${ location }/${ DOMAIN }/private-key.pem`, res.data.privateKey );

fs.writeFileSync( `${ location }/${ DOMAIN }/certificate.pem`, res.data.certificate );

Expand Down
2 changes: 1 addition & 1 deletion resources/external-resources-sources/build-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function getHeaders ( browser, protocol, headless = false ) {
server = new Server( {
"ssl": protocol === "https:",
"cert_file_name": certificates.defaultHttpsCertificate,
"key_file_name": certificates.defaultHttpsKey,
"key_file_name": certificates.defaultHttpsPrivateKey,
} ).get( "/*", async req => {
await req.end();

Expand Down

0 comments on commit 8206439

Please sign in to comment.