[ruby/openssl] ssl: remove OpenSSL::ExtConfig

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 https://github.com/ruby/openssl/commit/998d66712a78 (r55191).
HAVE_TLSEXT_HOST_NAME is unused since commit https://github.com/ruby/openssl/commit/4eb4b3297a92.

https://github.com/ruby/openssl/commit/eed3894bda
This commit is contained in:
Kazuki Yamaguchi 2022-12-23 04:34:43 +09:00
parent a4b4997c69
commit e6ca644329

View File

@ -33,7 +33,6 @@
} while (0) } while (0)
VALUE mSSL; VALUE mSSL;
static VALUE mSSLExtConfig;
static VALUE eSSLError; static VALUE eSSLError;
VALUE cSSLContext; VALUE cSSLContext;
VALUE cSSLSocket; VALUE cSSLSocket;
@ -2591,16 +2590,6 @@ Init_ossl_ssl(void)
*/ */
mSSL = rb_define_module_under(mOSSL, "SSL"); 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 /* Document-class: OpenSSL::SSL::SSLError
* *
* Generic error class raised by SSLSocket and SSLContext. * Generic error class raised by SSLSocket and SSLContext.
@ -2763,8 +2752,6 @@ Init_ossl_ssl(void)
*/ */
rb_attr(cSSLContext, rb_intern_const("session_remove_cb"), 1, 1, Qfalse); 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 * A callback invoked whenever a new handshake is initiated on an
* established connection. May be used to disable renegotiation entirely. * established connection. May be used to disable renegotiation entirely.
@ -2956,10 +2943,8 @@ Init_ossl_ssl(void)
*/ */
cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject); cSSLSocket = rb_define_class_under(mSSL, "SSLSocket", rb_cObject);
#ifdef OPENSSL_NO_SOCK #ifdef OPENSSL_NO_SOCK
rb_define_const(mSSLExtConfig, "OPENSSL_NO_SOCK", Qtrue);
rb_define_method(cSSLSocket, "initialize", rb_f_notimplement, -1); rb_define_method(cSSLSocket, "initialize", rb_f_notimplement, -1);
#else #else
rb_define_const(mSSLExtConfig, "OPENSSL_NO_SOCK", Qfalse);
rb_define_alloc_func(cSSLSocket, ossl_ssl_s_alloc); rb_define_alloc_func(cSSLSocket, ossl_ssl_s_alloc);
rb_define_method(cSSLSocket, "initialize", ossl_ssl_initialize, -1); rb_define_method(cSSLSocket, "initialize", ossl_ssl_initialize, -1);
rb_undef_method(cSSLSocket, "initialize_copy"); rb_undef_method(cSSLSocket, "initialize_copy");