diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index bdf6053dc..6bd9d3761 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -1156,11 +1156,6 @@ Init_openssl(void) rb_global_variable(&mOSSL); rb_define_singleton_method(mOSSL, "fixed_length_secure_compare", ossl_crypto_fixed_length_secure_compare, 2); - /* - * OpenSSL ruby extension version - */ - rb_define_const(mOSSL, "VERSION", rb_str_new2(OSSL_VERSION)); - /* * Version of OpenSSL the ruby OpenSSL extension was built with */ diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h index 2f76bdc85..8ff28dc2e 100644 --- a/ext/openssl/ossl.h +++ b/ext/openssl/ossl.h @@ -174,7 +174,6 @@ void ossl_debug(const char *, ...); #ifndef OPENSSL_NO_TS #include "ossl_ts.h" #endif -#include "ossl_version.h" #include "ossl_x509.h" #include "ossl_engine.h" #include "ossl_kdf.h" diff --git a/ext/openssl/ossl_version.h b/ext/openssl/ossl_version.h deleted file mode 100644 index c162f8c2a..000000000 --- a/ext/openssl/ossl_version.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * 'OpenSSL for Ruby' project - * Copyright (C) 2001-2002 Michal Rokos - * All rights reserved. - */ -/* - * This program is licensed under the same licence as Ruby. - * (See the file 'LICENCE'.) - */ -#if !defined(_OSSL_VERSION_H_) -#define _OSSL_VERSION_H_ - -#define OSSL_VERSION "2.1.2" - -#endif /* _OSSL_VERSION_H_ */ diff --git a/lib/openssl/version.rb b/lib/openssl/version.rb new file mode 100644 index 000000000..b07bb3300 --- /dev/null +++ b/lib/openssl/version.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +module OpenSSL + VERSION = "2.2.0" unless defined?(VERSION) +end diff --git a/openssl.gemspec b/openssl.gemspec index 7c17cd549..cac294847 100644 --- a/openssl.gemspec +++ b/openssl.gemspec @@ -1,6 +1,9 @@ + +require_relative 'lib/openssl/version' + Gem::Specification.new do |spec| spec.name = "openssl" - spec.version = "2.1.2" + spec.version = OpenSSL::VERSION spec.authors = ["Martin Bosslet", "SHIBATA Hiroshi", "Zachary Scott", "Kazuki Yamaguchi"] spec.email = ["ruby-core@ruby-lang.org"] spec.summary = %q{OpenSSL provides SSL, TLS and general purpose cryptography.}