1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge revision(s) 53718: [Backport #12320]

Skip SHA from test_digest_constants for LibreSSL 2.3

	The first one of ruby/openssl#40
	https://github.com/ruby/openssl/issues/40#issuecomment-159839338

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2016-05-03 17:57:57 +00:00
parent 15ce6732bd
commit 0b5e532ed3
2 changed files with 13 additions and 2 deletions

View file

@ -58,7 +58,10 @@ class OpenSSL::TestDigest < Test::Unit::TestCase
end
def test_digest_constants
algs = %w(DSS1 MD4 MD5 RIPEMD160 SHA SHA1)
algs = %w(DSS1 MD4 MD5 RIPEMD160 SHA1)
if !libressl? || !version_since([2,3])
algs += %w(SHA)
end
if OpenSSL::OPENSSL_VERSION_NUMBER > 0x00908000
algs += %w(SHA224 SHA256 SHA384 SHA512)
end
@ -122,6 +125,14 @@ class OpenSSL::TestDigest < Test::Unit::TestCase
d = OpenSSL::Digest.new(oid.oid)
assert_not_nil(d)
end
def libressl?
OpenSSL::OPENSSL_VERSION.include?('LibreSSL')
end
def version_since(verary)
(OpenSSL::OPENSSL_LIBRARY_VERSION.scan(/\d+/).map(&:to_i) <=> verary) != -1
end
end
end

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.3.2"
#define RUBY_RELEASE_DATE "2016-05-04"
#define RUBY_PATCHLEVEL 114
#define RUBY_PATCHLEVEL 115
#define RUBY_RELEASE_YEAR 2016
#define RUBY_RELEASE_MONTH 5