path: root/ext/digest
AgeCommit message (Collapse)Author
2021-04-26Fix some typos by spell checkerRyuta Kamizono
Notes: Merged:
2021-04-13dependency updates卜部昌平
Notes: Merged:
2020-12-21[ruby/digest] Remove .gitignore and .travis.yml from gemspecKenta Murata
2020-12-19[digest] Version 3.0.0Kenta Murata
2020-12-19[digest] Make digest Ractor safeKenta Murata
2020-12-19[digest] Added rb_digest_make_metadata to wrap metadataNobuyoshi Nakada
2020-12-03[ruby/digest] LICENSEHiroshi SHIBATA
2020-12-03[ruby/digest] Fixup d981714348f71177132426e3ac19598e1b2e8f5dHiroshi SHIBATA
2020-12-02digest: remove OpenSSL engineKazuki Yamaguchi
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] [2] [3] [4] Notes: Merged:
2020-10-21Update dependencies for macOSNobuyoshi Nakada
2020-10-19Followed up with 708413807ae958afb79257b18475424e0a8a4a56Hiroshi SHIBATA
* Added sync task for digest * Update doc/* for default gems * Update the latest version of gemspec
2020-10-19Revisit to promote digest to default gems.Hiroshi SHIBATA
This reverts commit f39021be7e0eac20ef7f06592769955ea482470f.
2020-08-27sed -i '/rmodule.h/d'卜部昌平
Notes: Merged:
2020-08-27sed -i '/r_cast.h/d'卜部昌平
Notes: Merged:
2020-08-27sed -i '\,2/extern.h,d'卜部昌平
Notes: Merged:
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
To fix build failures. Notes: Merged:
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged:
2020-04-08Suppress -Wshorten-64-to-32 warningsNobuyoshi Nakada
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <>
2020-03-10digest: do not depend on ext/openssl/deprecation.rbKazuki Yamaguchi
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 26e258c807c2. 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] [2]
2019-10-12Suppress deprecation warnings of MD5 from Xcode 11.1Nobuyoshi Nakada
2019-08-23Check metadata a bit moreNobuyoshi Nakada
2019-08-23Hoisted out get_digest_obj_metadataNobuyoshi Nakada
2019-08-22Hoisted out rb_id_metadataNobuyoshi Nakada
2019-08-22Hoisted out rb_digest_namespaceNobuyoshi Nakada
2019-08-21Separated initializing IDsNobuyoshi Nakada
2019-07-14Include ruby/assert.h in ruby/ruby.h so that assertions can be thereNobuyoshi Nakada
2019-02-14Prefer relative directory from srcdir to top_srcdirnobu
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-11Use $(hdrdir) for include/ruby.h, as well as r67033nobu
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08Removed moving toplevel header since r12501nobu
Moving public headers was 12-years ago, no depend files would expect ruby.h in the top source directory now. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16no ID cache in Init functionsnobu
Init functions are called only once, cache is useless. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Remove digest.gemspec for default gems.hsbt
It needs to support header file installation and uninstallation. But current RubyGems didn't support it feature yet. From: SHIBATA Hiroshi <> git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-16Added gemspec of digest library.hsbt
standalone repository is [Misc #13771][ruby-core:82179] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18Copy openssl library finder for ext/digest from OpenSSL extention.hsbt
* ext/digest/digest_conf.rb: Support to search variaous filenames of OpenSSL/LibreSSL libraries. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20fix hexdigest [ci skip]kazu
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20* remove trailing spaces.svn
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20* ext/digest/digest.c: Add documentation for Digest.hsbt
[Feature #10452][ruby-core:66001][ci skip] * remove HMAC from list of digest algorithms, * add MD5 in list of digest algorithms, * add information about writing a C digest implementation using Digest::Base, * add documentation for Digest::Base public methods. * ext/digest/md5/md5init.c: add examples for MD5. * ext/digest/rmd160/rmd160init.c: add examples for Digest::RMD160. * ext/digest/sha1/sha1init.c: add examples for Digest::SHA1. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30Use qualified namesnobu
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *.c: rename rb_funcall2 to rb_funcallv, except for extensions which are/will be/may be gems. [Fix GH-1406] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06Update dependenciesnobu
* (compile.o, loadpath.o): update dependencies. * (vm_call.o): remove stale object dependencies. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06Local header dependenciesnobu
* lib/mkmf.rb (create_makefile): store $headers in LOCAL_HDRS for depend files. * ext/digest/digest_conf.rb (digest_conf): add implementation specific headers to $header. * ext/digest/{md5,rmd160,sha1,sha2}/depend: add LOCAL_HDRS to the dependencies. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28* ext/digest/md5/md5ossl.h: Remove excess semicolons.ngoto
Suppress warning on Solaris with Oracle Solaris Studio 12. [ruby-dev:49692] [Bug #12524] * ext/digest/md5/md5cc.h: ditto. * ext/digest/sha1/sha1cc.h: ditto. * ext/digest/sha1/sha1ossl.h: ditto. * ext/digest/sha2/sha2cc.h: ditto. * ext/digest/sha2/sha2ossl.h: ditto. * ext/openssl/ossl_pkey_rsa.c: ditto. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11Update dependencies.akr
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26fixup! r52695naruse
OpenSSL's SHA1 struct name is SHA_CTX (which is also used for SHA-0), but function name is SHA1_Transform. also note that LibreSSL 2.3 remove the SHA-0 support but still support SHA-1. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21* ext/digest/sha1/extconf.rb: OpenSSL's struct name for SHA1 isnaruse
SHA_CTX. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21* ext/digest/*/*.[ch]: include ruby.h before digest.h to avoidnaruse
includeing ext/digest/extconf.h. [Bug #3231] * ext/digest/*/extconf.rb: remove ext/digest from include search path to avoid confusion of cl.exe. * ext/digest/*/*.[ch]: explicitly specify def.h's path. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-21digest.c: GC guardnobu
* ext/digest/digest.c (hexencode_str_new, rb_digest_base_update): prevent argument strings from GC. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16allocate structs with wrappernobu
* parse.y (rb_parser_new, ripper_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. * variable.c (rb_autoload): ditto. * ext/digest/digest.c (rb_digest_base_alloc): ditto. * ext/strscan/strscan.c (strscan_s_allocate): ditto. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-15* doc/contributors.rdoc: fix a typo. Patch by @davydovantonhsbt
[fix GH-872][ci skip] * doc/syntax/methods.rdoc: ditto. * ext/digest/sha2/sha2.c: ditto. * ext/socket/ipsocket.c: ditto. * ext/tk/*: ditto. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e