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

fix: respect https.cacert option #3820

Merged
merged 16 commits into from Sep 9, 2021
Merged

fix: respect https.cacert option #3820

merged 16 commits into from Sep 9, 2021

Conversation

snitin315
Copy link
Member

@snitin315 snitin315 commented Sep 9, 2021

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

No

Motivation / Use-Case

Fix #3814

Breaking Changes

None

Additional Info

https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options

@snitin315
Copy link
Member Author

Let's add ca in a separate PR as it is a feature. Or should we add it to this PR?

@codecov
Copy link

codecov bot commented Sep 9, 2021

Codecov Report

Merging #3820 (d30fff7) into master (beaeb27) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3820      +/-   ##
==========================================
- Coverage   92.80%   92.72%   -0.09%     
==========================================
  Files          14       14              
  Lines        1321     1333      +12     
  Branches      463      470       +7     
==========================================
+ Hits         1226     1236      +10     
- Misses         87       89       +2     
  Partials        8        8              
Impacted Files Coverage Δ
bin/cli-flags.js 100.00% <ø> (ø)
lib/Server.js 93.62% <100.00%> (+0.07%) ⬆️
lib/servers/WebsocketServer.js 91.42% <0.00%> (-5.72%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update beaeb27...d30fff7. Read the comment docs.

@alexander-akait
Copy link
Member

I will finish PR, here some more work

lib/Server.js Outdated Show resolved Hide resolved
@alexander-akait
Copy link
Member

alexander-akait commented Sep 9, 2021

@snitin315 Need documented after merge:

https: {
  // Allow to set additional TSL options https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options
  minVersion: "TLSv1.1",
  ca: path.join(httpsCertificateDirectory, "ca.pem")),
  pfx: path.join(httpsCertificateDirectory, "server.pfx"),
  key: path.join(httpsCertificateDirectory, "server.key"),
  cert: path.join(httpsCertificateDirectory, "server.crt"),
  passphrase: "webpack-dev-server",
},

@snitin315
Copy link
Member Author

@alexander-akait I will take care of documentation 👍🏻

@alexander-akait alexander-akait merged commit 0002ebf into master Sep 9, 2021
@alexander-akait alexander-akait deleted the fix-https-cacert branch September 9, 2021 15:28
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.

cacert option in https not working
2 participants