GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — doc: clarify tls.createServer's {cert, ca} by wacky6 · Pull Request #7230 · nodejs/node ConversationChecklist
Affected core subsystem(s)doc Description of change
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions1. clarity cert to match bottom-half in src/node_crypto.cc setCert() calls SSL_CTX_use_certificate_chain() 2. clarity ca is to be used with requestCert Previously, nothing is mentioned about certificate chain, this may be confusing to beginners. They may pass intermediate certificates to ca option. If requestCert is false, this won't cause any problem. As bottom-half will try to find and insert intermediate certificates from ca store.
rvagg
force-pushed
the
master
branch
2 times, most recently
from
c133999 to
83c7a88
Compare
silverwind
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The intermediates should be optional and they are preferably placed in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a) Why is it preferable to place them in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
silverwind
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not entirely correct. Node.js bundles Mozilla's root certificate bundle, which if I'm not mistaken are extended by the certificates provided by the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The text is arguably correct, if you consider the ca option to have a default, the bundled certs. But its confusing. @sliverwind the builtin certs aren't extended by the ca option, they are replaced (for this server)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, then I totally misunderstood that option. If they are to be replaced, it certainly makes sense to provide a cert bundle instead.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
silverwind
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather like to recommend using the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
sam-github
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That isn't helpful, you need to describe what it does, and why what it does combines well with other options.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
sam-github
pushed a commit
to sam-github/node
that referenced
this pull request
fixes nodejs#7230 Reviewed-By: James M Snell <[email protected]> PR-URL: nodejs/node-v0.x-archive#25591
|
There was an error while loading. Please reload this page.
|
@sam-github @indutny are we certain that intermediate certs placed in a { cert: [maincert, intermediate], key: key } And OpenSSL just gives me this: On the other hand, this works as expected: { cert: maincert, key: key, ca: [intermediate] } I'm pretty sure we are either misdocumenting this and intermediates only work in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
They definitely work in the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@indutny I'm pretty sure it's broken. Here's a test that uses a valid cert chain from a test CA I created: https://gist.github.com/silverwind/98d7b717617cbc52bce46498e351ec9f It failes with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Is that a valid cert chain? cert 0 and cert 1 have identical subject and issuer unless I am misreading your comment above, so cert 0 is not signed by cert 1. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Yes (I was following https://jamielinux.com/docs/openssl-certificate-authority almost verbatim): The issue should also be reproducible with any LetsEncrypt cert. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
That cert is self-signed, and has exactly the same subject/issuer pair as the intermediate cert, and the CA cert, I think the chain just confuses OpenSSL. Tests for cert chains with intermediate certs: #10747 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'm certain that the files in the example are not the cause of this |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@sam-github Here's an example using your certs. It fails to start with the dreaded |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Okay I think this was actually just a misinterpretion of the docs on my side.
With the intermediate in a separate array entry, openssl gets rightly confused for the missing key. So I guess no action needed here. As for this PR: I'll close. Docs have been overhauled in the meanwhile and I guess it just doesn't apply anymore, sorry. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
fixes nodejs#7230 Reviewed-By: James M Snell <[email protected]> PR-URL: nodejs/node-v0.x-archive#25565
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.