Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update self signed ssl certificates #436

Merged
merged 1 commit into from
Mar 24, 2016

Conversation

anze3db
Copy link
Contributor

@anze3db anze3db commented Mar 24, 2016

This should resolve issue #340.

The new certificate will expire in 5 years (Thursday 24 March 2021).

I believe most of the data is the same, but I have added localhost as a Common Name so that Chrome will accept it.

screen shot 2016-03-25 at 00 03 37

@sokra sokra merged commit 7df2812 into webpack:master Mar 24, 2016
@sokra
Copy link
Member

sokra commented Mar 24, 2016

Thanks

@phorozan
Copy link

phorozan commented Apr 18, 2016

Thanks for this great fix, is this released?

@wbobeirne
Copy link

I'm still getting the broken red lock of doom in Chrome Canary (Version 53.0.2766.0 canary) it's complaining that the cert hasn't been verified by a third party. Is this something that can be resolved?

screen shot 2016-06-13 at 6 33 50 pm

@wwselleck
Copy link

I'm getting a red lock as well, but with a different error (Chrome 51.0.2704.84)

screen shot 2016-06-14 at 12 13 33 pm

@wwselleck
Copy link

I just upgraded to these versions

"webpack": "^2.1.0-beta.0",
"webpack-dev-server": "^v2.1.0-beta.0"

and am now getting the same error as @wbobeirne

screen shot 2016-06-14 at 12 24 38 pm

@wbobeirne
Copy link

@wwselleck it looks like you're using the old certificate, likely meaning you're on a version of webpack-dev-server that hasn't been updated since March 24th. The current stable version on npm (1.14.1) has the old cert.

@wwselleck
Copy link

@wbobeirne Refresh, I updated and got the same error as you 😄

@deevus
Copy link

deevus commented Jun 15, 2016

Is there a definitive solution for this? What is the earliest version that has the new certificate?

@wwselleck
Copy link

I was able to get past the "This certificate has not been verified..." error by just proceeding anyway on Chrome, and adding a security exception on Firefox, once I got to the red lock screen. After that calls to the webpack dev server were going through.

@deevus
Copy link

deevus commented Jun 16, 2016

I have another project that enforces HSTS so proceeding only works as long as I don't visit the other site. That doesn't work well when I'm trying to implement SSO D:

@ashier
Copy link

ashier commented Aug 16, 2016

Got this working via pointing the key, cert and ca to the correct files.

var fs = require('fs');
var path = require('path');
var webpack = require('webpack')
var WebpackDevServer = require('webpack-dev-server')
var config = require('./webpack.local.config')

var ops = {
    cert: '/path to webpack ssl/server.crt',
    ca: '/path to webpack ssl/ca.crt',
    key: '/path to webpack ssl/server.key'
};

new WebpackDevServer(webpack(config), {
  https: true,
  cert: fs.readFileSync(ops.cert),
  ca: fs.readFileSync(ops.cert),
  key: fs.readFileSync(ops.key),
  requestCert: true,
  rejectUnauthorized: true,
  publicPath: config.output.publicPath,
  hot: true,
  inline: true,
  historyApiFallback: true
}).listen(3000, '0.0.0.0', function(err, result) {
  if (err) {
    console.log(err)
  }

  console.log('Listening at https://localhost:3000')
})

Then adding the certificate to my Keychain Access and trusting the certificate.

Hope this helps.

  • ashier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants