Skip to content

Commit

Permalink
[FIX] sslUtils: Fix Invalid Common Name error
Browse files Browse the repository at this point in the history
Caused by (incorrect) regex introduced in
guybedford/devcert@571f4e6
and released as patch.

Resolved by pin devcert-sanscache dependency to last working version
0.4.6
  • Loading branch information
RandomByte committed Jan 24, 2020
1 parent cacda00 commit db06db7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/sslUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async function createAndInstallCertificate(keyPath, certPath) {
"SSL certificate into the operating system and browsers.");
}

const {key, cert} = await devCert("ui5-tooling");
const {key, cert} = await devCert("UI5Tooling");
await Promise.all([
// Write certificates to the ui5 certificate folder
// such that they are used by default upon next startup
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"compression": "^1.7.4",
"connect-openui5": "^0.9.0",
"cors": "^2.8.5",
"devcert-sanscache": "^0.4.7",
"devcert-sanscache": "0.4.6",
"escape-html": "^1.0.3",
"etag": "^1.8.1",
"express": "^4.17.1",
Expand Down
4 changes: 2 additions & 2 deletions test/lib/server/sslUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test.serial("Create new certificate and install it", (t) => {
});

mock("devcert-sanscache", function(name) {
t.deepEqual(name, "ui5-tooling", "Create certificate for ui5-tooling.");
t.deepEqual(name, "UI5Tooling", "Create certificate for UI5Tooling.");
return Promise.resolve({
key: sslKey,
cert: sslCert
Expand Down Expand Up @@ -119,7 +119,7 @@ test.serial("Create new certificate not succeeded", async (t) => {
});

mock("devcert-sanscache", function(name) {
t.deepEqual(name, "ui5-tooling", "Create certificate for ui5-tooling.");
t.deepEqual(name, "UI5Tooling", "Create certificate for UI5Tooling.");
return Promise.resolve({
key: "aaa",
cert: "bbb"
Expand Down

0 comments on commit db06db7

Please sign in to comment.