Skip to content

Commit

Permalink
[ruby/openssl] ssl: remove OpenSSL::ExtConfig
Browse files Browse the repository at this point in the history
This module was introduced in 2015 for internal use within this library.
Neither of the two constants in it is used anymore. I don't think we
will be adding a new constant in the foreseeable future, either.

OPENSSL_NO_SOCK is unused since commit ruby/openssl@998d66712a78 (r55191).
HAVE_TLSEXT_HOST_NAME is unused since commit ruby/openssl@4eb4b3297a92.

ruby/openssl@eed3894bda
  • Loading branch information
rhenium committed Dec 23, 2022
1 parent a4b4997 commit e6ca644
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions ext/openssl/ossl_ssl.c
Expand Up @@ -33,7 +33,6 @@
} while (0)

VALUE mSSL;
static VALUE mSSLExtConfig;
static VALUE eSSLError;
VALUE cSSLContext;
VALUE cSSLSocket;
Expand Down Expand Up @@ -2591,16 +2590,6 @@ Init_ossl_ssl(void)
*/
mSSL = rb_define_module_under(mOSSL, "SSL");

/* Document-module: OpenSSL::ExtConfig
*
* This module contains configuration information about the SSL extension,
* for example if socket support is enabled, or the host name TLS extension
* is enabled. Constants in this module will always be defined, but contain
* +true+ or +false+ values depending on the configuration of your OpenSSL
* installation.
*/
mSSLExtConfig = rb_define_module_under(mOSSL, "ExtConfig");

/* Document-class: OpenSSL::SSL::SSLError
*
* Generic error class raised by SSLSocket and SSLContext.
Expand Down Expand Up @@ -2763,8 +2752,6 @@ Init_ossl_ssl(void)
*/
rb_attr(cSSLContext, rb_intern_const("session_remove_cb"), 1, 1, Qfalse);

rb_define_const(mSSLExtConfig, "HAVE_TLSEXT_HOST_NAME", Qtrue);

/*
* A callback invoked whenever a new handshake is initiated on an
* established connection. May be used to disable renegotiation entirely.
Expand Down Expand Up @@ -2956,10 +2943,8 @@ Init_ossl_ssl(void)
*/
cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject);
#ifdef OPENSSL_NO_SOCK
rb_define_const(mSSLExtConfig, "OPENSSL_NO_SOCK", Qtrue);
rb_define_method(cSSLSocket, "initialize", rb_f_notimplement, -1);
#else
rb_define_const(mSSLExtConfig, "OPENSSL_NO_SOCK", Qfalse);
rb_define_alloc_func(cSSLSocket, ossl_ssl_s_alloc);
rb_define_method(cSSLSocket, "initialize", ossl_ssl_initialize, -1);
rb_undef_method(cSSLSocket, "initialize_copy");
Expand Down

0 comments on commit e6ca644

Please sign in to comment.