Commit graph

273 commits

Author SHA1 Message Date
Akinori MUSHA
67aab88a22 Import digest v3.1.0 from ruby/digest 2021-12-24 20:06:23 +09:00
Nobuyoshi Nakada
40a1af6151
Install ruby/digest.h when from ext/digest 2021-12-23 20:12:45 +09:00
Nobuyoshi Nakada
ac152b3cac
Update dependencies 2021-11-21 16:21:18 +09:00
Yusuke Endoh
d23b3d9b7d Prevent "already initialized constant Digest::VERSION"
20211117T033003Z.log.html.gz
```
installing default gems from ext:   /home/chkbuild/chkbuild/tmp/build/20211117T033003Z/lib/ruby/gems/3.1.0
/home/chkbuild/chkbuild/tmp/build/20211117T033003Z/ruby/ext/digest/lib/digest/version.rb:4: warning: already initialized constant Digest::VERSION
/home/chkbuild/chkbuild/tmp/build/20211117T033003Z/ruby/.ext/common/digest/version.rb:4: warning: previous definition of VERSION was here
```

This hack is copied from ext/psych/psych.gemspec
2021-11-17 15:08:46 +09:00
Hiroshi SHIBATA
018266ca38
Merge digest-3.0.3.pre3 and efd76821b8 2021-11-16 19:42:20 +09:00
Akinori MUSHA
625cffc808 [ruby/digest] Abort loading if being loaded by gem/bundle pre Ruby 3.0.3
efd76821b8
2021-11-16 18:35:13 +09:00
xtkoba
fed65e6a48 [ruby/digest] Avoid null pointer subtraction in digest/md5
Fixes warning on Clang 13.

Fixes [Bug #18076]

32135c7487
2021-11-16 18:35:07 +09:00
Hiroshi SHIBATA
9e86a60306
Removed redundant digest namespace 2021-10-14 14:07:50 +09:00
Hiroshi SHIBATA
3265af2f9e
separate pure ruby location under the digest/* extensions 2021-10-14 13:31:45 +09:00
Hiroshi SHIBATA
13772caee2
Move pure ruby files under the ext/gemname/lib directory. 2021-10-14 13:23:45 +09:00
Nobuyoshi Nakada
013bac15b0
Fix libraries under digest 2021-10-12 22:32:42 +09:00
Akinori MUSHA
01dc55ffad
[ruby/digest] Bump version to 3.1.0.pre2
5184207611
2021-10-12 20:53:18 +09:00
Akinori MUSHA
ab787c493b
[ruby/digest] Bump version to 3.1.0.pre1
56679008cf
2021-10-12 20:53:18 +09:00
Pavel Rosický
10a0fac7e4
[ruby/digest] include jars
c15cbcd978
2021-10-12 20:53:17 +09:00
Akinori MUSHA
e94bcda025
[ruby/digest] Bump version to 3.1.0.pre0
594cc4d548
2021-10-12 20:53:17 +09:00
Akinori MUSHA
b245b67d9e
[ruby/digest] Place common parts in lib and engine specific parts under ext/**/lib
8d7496c3be
2021-10-12 20:53:16 +09:00
Pavel Rosický
5e1d2c5c97
[ruby/digest] relicence under the Ruby license and the BSD 2-clause
154d461e91
2021-10-12 20:46:16 +09:00
Pavel Rosický
94882df3a2
[ruby/digest] jruby support
2e9dc14693
2021-10-12 20:46:13 +09:00
Nobuyoshi Nakada
ff1f696d30
[ruby/digest] Move digest.rb back under ext as the extension bundled library
026ba7f361
2021-10-12 20:44:14 +09:00
Hiroshi SHIBATA
30d0e5d1ae
[ruby/digest] Also drop to support Ruby 2.4
360a7de366
2021-07-28 11:48:36 +09:00
Hiroshi SHIBATA
260546ba26
[ruby/digest] Use Gemfile instead of Gem::Specification#add_development_dependency
460a6f807e
2021-07-28 11:48:36 +09:00
Hiroshi SHIBATA
5b96f4dd8c
[ruby/digest] Drop to support Ruby 2.3
23dc9c7425
2021-07-28 11:48:36 +09:00
Olle Jonsson
26e859b5c7
[ruby/digest] gemspec: Avoid distributing extraneous files
0a451e0c94
2021-07-28 11:48:36 +09:00
Olle Jonsson
add48acea3
[ruby/digest] gemspec: Explicitly have 0 executables
086d54ba94
2021-07-28 11:48:36 +09:00
Olle Jonsson
478f0ddb5f
[ruby/digest] Experiment: Use a .pre version in gemspec
This makes it slightly more explicit that this is not a definite new version.

2bb5bb78a3
2021-07-28 11:48:36 +09:00
Olle Jonsson
73c5d4d54e
[ruby/digest] Experiment: bump patch version
This is a test, to see if the build failures are about the shipped Ruby master version of this gem.

d2606b2cce
2021-07-28 11:48:36 +09:00
Nobuyoshi Nakada
32b18fe9d0
Suppress array-parameter warnings by gcc 11 2021-06-13 15:12:45 +09:00
Nobuyoshi Nakada
96fd1e1f22
Removed unused macro HAVE_CONFIG_H
It seems like a vestige of ext/md5.
2021-04-28 18:48:08 +09:00
Nobuyoshi Nakada
795fb51f80
NDEBUG is ignored since Ruby 3.0 2021-04-28 18:48:08 +09:00
Ryuta Kamizono
33f2ff3bab Fix some typos by spell checker 2021-04-26 10:07:41 +09:00
卜部昌平
6413dc27dc dependency updates 2021-04-13 14:30:21 +09:00
Kenta Murata
d8469507b9
[ruby/digest] Remove .gitignore and .travis.yml from gemspec
7b57b73f46
2020-12-21 17:46:30 +09:00
Kenta Murata
0cb556b457
[digest] Version 3.0.0
4bbd247a32
2020-12-19 15:08:01 +09:00
Kenta Murata
b66f52b0e3
[digest] Make digest Ractor safe
c13a024b85
9edca3f8be
378b56b6ca
2020-12-19 15:08:01 +09:00
Nobuyoshi Nakada
feacae193c
[digest] Added rb_digest_make_metadata to wrap metadata
7046fe6005
2020-12-19 15:08:01 +09:00
Hiroshi SHIBATA
412a0f5240
[ruby/digest] LICENSE
aa048ce345
2020-12-03 17:35:28 +09:00
Hiroshi SHIBATA
7324d76da4
[ruby/digest] Fixup d981714348f71177132426e3ac19598e1b2e8f5d
502a12587c
2020-12-03 17:35:28 +09:00
Kazuki Yamaguchi
2e601c284c digest: remove OpenSSL engine
The OpenSSL engine of Digest uses the low-level API of OpenSSL, whose
use has been discouraged for years for multiple reasons.

A long-standing issue on a FIPS-enabled system is that using ::Digest
results in crashing the Ruby process, because the low-level API lacks
the mechanism to report an error (the policy violation) and thus kills
the process as a last resort[1][2]. Also, the upcoming OpenSSL 3.0 will
deprecate it for future removal[3]. Compiling with
-Wdeprecated-declarations will start to emit warnings.

A proper fix for this is to make it use the EVP API instead. This is a
non-trivial work as it requires backwards-incompatible changes to the
framework interface of Digest::Base and rb_digest_metadata_t.

It is more than 15 years ago that the openssl library became part of the
standard library. It has implemented the exactly same functionality as
OpenSSL::Digest, in fact, as a subclass of Digest::Class. There is not
much point in having an identical code in the digest library. Let's
just get rid of OpenSSL within digest. This leaves the C implementations
and the CommonCrypto engine for Apple systems.

A patch is being prepared for the openssl library to provide ::Digest
constants for better performance[4].

[1] https://bugs.ruby-lang.org/issues/6946
[2] https://bugs.ruby-lang.org/issues/13681
[3] https://www.openssl.org/docs/OpenSSL300Design.html
[4] https://github.com/ruby/openssl/pull/377
2020-12-02 11:09:12 +09:00
Nobuyoshi Nakada
d497436d07
Update dependencies for macOS 2020-10-21 12:31:45 +09:00
Hiroshi SHIBATA
3f97940252
Followed up with 708413807a
* Added sync task for digest
  * Update doc/* for default gems
  * Update the latest version of gemspec
2020-10-19 18:56:19 +09:00
Hiroshi SHIBATA
708413807a
Revisit to promote digest to default gems.
This reverts commit f39021be7e.
2020-10-19 18:38:09 +09:00
卜部昌平
490010084e sed -i '/rmodule.h/d' 2020-08-27 16:42:06 +09:00
卜部昌平
756403d775 sed -i '/r_cast.h/d' 2020-08-27 15:03:36 +09:00
卜部昌平
0da2a3f1fc sed -i '\,2/extern.h,d' 2020-08-27 14:07:49 +09:00
卜部昌平
9e41a75255 sed -i 's|ruby/impl|ruby/internal|'
To fix build failures.
2020-05-11 09:24:08 +09:00
卜部昌平
d7f4d732c1 sed -i s|ruby/3|ruby/impl|g
This shall fix compile errors.
2020-05-11 09:24:08 +09:00
Nobuyoshi Nakada
d8720eb7de
Suppress -Wshorten-64-to-32 warnings 2020-04-08 16:28:38 +09:00
卜部昌平
9e6e39c351
Merge pull request #2991 from shyouhei/ruby.h
Split ruby.h
2020-04-08 13:28:13 +09:00
Kazuki Yamaguchi
28f3e03880 digest: do not depend on ext/openssl/deprecation.rb
ext/openssl/deprecation.rb has been removed in ext/openssl upstream[1].

It was originally introduced to detect and prevent linking against
Apple's bundled (and very outdated) version of OpenSSL. It is long gone
and the header files do not exist in current versions of macOS.

The dependency in ext/digest was introduced by commit 26e258c807.
Note that the original issue[2] is resolved without this dependency.
The commit also added the pkg_config("openss") call to match what
ext/openssl does.

[1] https://github.com/ruby/openssl/pull/333
[2] https://bugs.ruby-lang.org/issues/6379
2020-03-10 17:41:01 +09:00
Nobuyoshi Nakada
f405564711
Suppress deprecation warnings of MD5 from Xcode 11.1 2019-10-12 18:47:06 +09:00