Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ext/openssl/ossl.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,7 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
* An \SSL server requires the certificate and private key to communicate
* securely with its clients:
*
* context.cert = cert
* context.key = key
* context.add_certificate(cert, key)
*
* After establishing a TCP connection, the socket is wrapped in an
* OpenSSL::SSL::SSLSocket with the context. OpenSSL::SSL::SSLSocket#accept
Expand Down
22 changes: 13 additions & 9 deletions ext/openssl/ossl_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1178,11 +1178,13 @@ ossl_sslctx_set_client_sigalgs(VALUE self, VALUE v)
*
* Added in version 3.0. See also the man page SSL_CTX_set0_tmp_dh_pkey(3).
*
* Example:
* === Example
* ctx = OpenSSL::SSL::SSLContext.new
* ctx.tmp_dh = OpenSSL::DH.generate(2048)
* svr = OpenSSL::SSL::SSLServer.new(tcp_svr, ctx)
* Thread.new { svr.accept }
* ctx.tmp_dh = OpenSSL::PKey::DH.generate(2048)
* Thread.new {
* ssl = OpenSSL::SSL::SSLSocket.new(tcp_svr.accept, ctx)
* ssl.accept
* }
*/
static VALUE
ossl_sslctx_set_tmp_dh(VALUE self, VALUE arg)
Expand Down Expand Up @@ -1230,9 +1232,11 @@ ossl_sslctx_set_tmp_dh(VALUE self, VALUE arg)
*
* === Example
* ctx1 = OpenSSL::SSL::SSLContext.new
* ctx1.groups = "X25519:P-256:P-224"
* svr = OpenSSL::SSL::SSLServer.new(tcp_svr, ctx1)
* Thread.new { svr.accept }
* ctx1.groups = "X25519:P-256"
* Thread.new {
* ssl = OpenSSL::SSL::SSLSocket.new(tcp_svr.accept, ctx1)
* ssl.accept
* }
*
* ctx2 = OpenSSL::SSL::SSLContext.new
* ctx2.groups = "P-256"
Expand Down Expand Up @@ -2803,8 +2807,8 @@ Init_ossl_ssl(void)
/* Document-module: OpenSSL::SSL
*
* Use SSLContext to set up the parameters for a TLS (former SSL)
* connection. Both client and server TLS connections are supported,
* SSLSocket and SSLServer may be used in conjunction with an instance
* connection. Both client and server TLS connections are supported.
* SSLSocket may be used in conjunction with a TCPServer and an instance
* of SSLContext to set up connections.
*/
mSSL = rb_define_module_under(mOSSL, "SSL");
Expand Down
Loading