Conversation
…n example The SSLContext#cert= and #key= methods are deprecated in favor of #add_certificate. Update the SSL server example in ossl.c. Assisted-by: Claude:Opus 4.6
The commit a77ed4b deprecated SSLServer. Update code examples and the OpenSSL::SSL module description to use SSLSocket and TCPServer instead. Fix OpenSSL::DH.generate to OpenSSL::PKey::DH.generate in the tmp_dh= example. Remove P-224 from #groups= example, as I got an error with P-224 on my local OpenSSL 4.1.0-dev. test.rb ``` require 'openssl' require 'socket' tcp_svr = TCPServer.new('127.0.0.1', 10043) ctx1 = OpenSSL::SSL::SSLContext.new ctx1.groups = "X25519:P-256:P-224" Thread.new { ssl = OpenSSL::SSL::SSLSocket.new(tcp_svr.accept, ctx1) ssl.accept } ``` ``` $ ruby -I lib -r openssl -e 'puts OpenSSL::OPENSSL_VERSION' OpenSSL 4.1.0-dev $ ruby -I ./lib test.rb ... test.rb:9:in 'OpenSSL::SSL::SSLSocket#accept': SSL_accept returned=1 errno=0 peeraddr=127.0.0.1:54616 state=error: no shared cipher (OpenSSL::SSL::SSLError) OpenSSL error queue reported 1 errors: error:0A0000C1:SSL routines:tls_post_process_client_hello:no shared cipher from test.rb:9:in 'block in <main>' test.rb:16:in 'OpenSSL::SSL::SSLSocket#connect': SSL_connect returned=1 errno=0 peeraddr=127.0.0.1:10043 state=error: tls alert handshake failure (SSL alert number 40) (OpenSSL::SSL::SSLError) OpenSSL error queue reported 1 errors: error:0A000410:SSL routines:ssl3_read_bytes:tls alert handshake failure (SSL alert number 40) from test.rb:16:in '<main>' ``` Assisted-by: Claude:Opus 4.6
junaruga
force-pushed
the
wip/doc-replace-deprecated-class-method-examples
branch
from
October 2, 2026 17:37
55b22d3 to
ed62ad4
Compare
rhenium
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the document issues that deprecated SSLContext#cert=/key= and SSLServer are used in the code examples. It has the following 2 commits. See the commit messages for details. I confirmed the rdoc files generated by
bundle exec rake rdoc.