| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The example under "Setting security levels" does not run. The client sets `maxVersion: 'TLSv1'` while its `minVersion` stays at the `tls.DEFAULT_MIN_VERSION` default of `'TLSv1.2'`, so no version overlaps and the connection fails with ERR_SSL_NO_PROTOCOLS_AVAILABLE. Setting the client's `minVersion` is not enough on its own: the handshake then fails with an alert 40, because `createServer` is given no key or certificate and the server has no shared cipher. Set `minVersion` on the client, add the key and certificate placeholders and the openssl recipe that the other sections using them already carry, pass the server certificate as the client's `ca`, and use port 8000 like the rest of the file. The section now runs from an empty directory and prints "Client connected with protocol: TLSv1". Signed-off-by: Julian Soreavis <julian.soreavis@gmail.com>
The example under "Setting security levels" does not run. The client sets `maxVersion: 'TLSv1'` while its `minVersion` stays at the `tls.DEFAULT_MIN_VERSION` default of `'TLSv1.2'`, so no version overlaps and the connection fails with ERR_SSL_NO_PROTOCOLS_AVAILABLE. Setting the client's `minVersion` is not enough on its own: the handshake then fails with an alert 40, because `createServer` is given no key or certificate and the server has no shared cipher. Set `minVersion` on the client, add the key and certificate placeholders and the openssl recipe that the other sections using them already carry, pass the server certificate as the client's `ca`, and use port 8000 like the rest of the file. The section now runs from an empty directory and prints "Client connected with protocol: TLSv1". Signed-off-by: Julian Soreavis <julian.soreavis@gmail.com> PR-URL: #65391 Fixes: #60569 Refs: #60571 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
The example under "Setting security levels" does not run. The client sets `maxVersion: 'TLSv1'` while its `minVersion` stays at the `tls.DEFAULT_MIN_VERSION` default of `'TLSv1.2'`, so no version overlaps and the connection fails with ERR_SSL_NO_PROTOCOLS_AVAILABLE. Setting the client's `minVersion` is not enough on its own: the handshake then fails with an alert 40, because `createServer` is given no key or certificate and the server has no shared cipher. Set `minVersion` on the client, add the key and certificate placeholders and the openssl recipe that the other sections using them already carry, pass the server certificate as the client's `ca`, and use port 8000 like the rest of the file. The section now runs from an empty directory and prints "Client connected with protocol: TLSv1". Signed-off-by: Julian Soreavis <julian.soreavis@gmail.com> PR-URL: #65391 Fixes: #60569 Refs: #60571 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
The example under "Setting security levels" does not run. The client sets maxVersion: 'TLSv1' while its minVersion stays at the tls.DEFAULT_MIN_VERSION default of 'TLSv1.2', so no version overlaps and the connection fails with ERR_SSL_NO_PROTOCOLS_AVAILABLE — the error @davidebombelli reported in #60569, having copied the snippet straight out of these docs. @pimterry said the behavior itself is correct and asked for a docs fix.
Setting the client's minVersion, the fix suggested on the issue, isn't enough on its own: the handshake then fails with an alert 40, because createServer is given no key or certificate and the server has no shared cipher (ERR_SSL_NO_SHARED_CIPHER). This sets minVersion on the client, adds the server-key.pem/server-cert.pem placeholders and the openssl req recipe that the other two sections using those placeholders already carry, passes the server certificate as the client's ca, and uses the port 8000 the rest of the file uses rather than 443.
Verified on v26.7.0 (OpenSSL 3.6.3) from an empty directory: the section's recipe and both code blocks, extracted from this diff and run unmodified, print Client connected with protocol: TLSv1. They still fail with either piece missing — ERR_SSL_NO_PROTOCOLS_AVAILABLE without the client minVersion, alert 40 without the certificate. The snippet landed already missing both pieces, in 059f2f4 (July 2024).
#60571 proposed adding a note describing the failure; per the follow-up on the issue the example itself should work, so this fixes the example instead.
I used an AI assistant while researching and drafting this change; I've verified the behavior with live repros and against the source myself and take full responsibility for it.
Fixes: #60569
Refs: #60571