Граф коммитов

224 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada f405564711
Suppress deprecation warnings of MD5 from Xcode 11.1 2019-10-12 18:47:06 +09:00
Nobuyoshi Nakada a5b809e994
Check metadata a bit more 2019-08-23 13:00:17 +09:00
Nobuyoshi Nakada 650cd24555
Hoisted out get_digest_obj_metadata 2019-08-23 12:27:48 +09:00
Nobuyoshi Nakada a963851100
Hoisted out rb_id_metadata 2019-08-22 00:19:56 +09:00
Nobuyoshi Nakada 74c6662af5
Hoisted out rb_digest_namespace 2019-08-22 00:19:55 +09:00
Nobuyoshi Nakada 3df9f3cc13
Separated initializing IDs 2019-08-21 16:20:31 +09:00
Nobuyoshi Nakada 715955ff27
Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
nobu d1e6304a89 Prefer relative directory from srcdir to top_srcdir
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-14 05:42:14 +00:00
nobu 63f990674b Use $(hdrdir) for include/ruby.h, as well as r67033
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-11 13:43:14 +00:00
nobu 3d1c86a26f Removed moving toplevel header since r12501
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://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 02:46:22 +00:00
nobu c8094ff154 no ID cache in Init functions
Init functions are called only once, cache is useless.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-16 08:39:48 +00:00
hsbt f39021be7e Remove digest.gemspec for default gems.
It needs to support header file installation and uninstallation.
  But current RubyGems didn't support it feature yet.

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19 02:43:09 +00:00
hsbt 74c3a220ba Added gemspec of digest library.
standalone repository is https://github.com/ruby/digest
  [Misc #13771][ruby-core:82179]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-16 09:37:03 +00:00
hsbt 13155d4df5 Copy openssl library finder for ext/digest from OpenSSL extention.
* ext/digest/digest_conf.rb: Support to search variaous filenames of
    OpenSSL/LibreSSL libraries.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-18 11:28:49 +00:00
kazu 6f22fc6b70 fix hexdigest [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20 13:18:52 +00:00
svn 10035cb4bc * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20 07:57:31 +00:00
hsbt 814c1adec7 * ext/digest/digest.c: Add documentation for Digest.
[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://ci.ruby-lang.org/ruby/trunk@56455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-20 07:57:30 +00:00
nobu 4b298ad77a Use qualified names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30 06:22:30 +00:00
nobu c463366dfd rb_funcallv
* *.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://ci.ruby-lang.org/ruby/trunk@55773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-29 11:57:14 +00:00
nobu 64fea27496 Update dependencies
* common.mk (compile.o, loadpath.o): update dependencies.

* common.mk (vm_call.o): remove stale object dependencies.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06 05:48:13 +00:00
nobu 1bdc1a5529 Local header dependencies
* 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://ci.ruby-lang.org/ruby/trunk@55588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06 05:44:58 +00:00
ngoto 8b251c6c2c * ext/digest/md5/md5ossl.h: Remove excess semicolons.
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://ci.ruby-lang.org/ruby/trunk@55523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 09:42:29 +00:00
akr 9d8ef4ea20 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11 11:50:00 +00:00
naruse c4fdfabcc8 handle ext/ as r53141
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts
fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&#
frozen_string_literal: false\n");f.rewind;f.write s}}'

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:31:54 +00:00
naruse 360b98355e fixup! r52695
OpenSSL's SHA1 struct name is SHA_CTX (which is also used for SHA-0),
but function name is SHA1_Transform.
http://openssl.org/docs/man0.9.8/crypto/SHA1.html

also note that LibreSSL 2.3 remove the SHA-0 support but still support SHA-1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26 08:31:12 +00:00
naruse bbc63197bd * ext/digest/sha1/extconf.rb: OpenSSL's struct name for SHA1 is
SHA_CTX. http://openssl.org/docs/man0.9.8/crypto/SHA1.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21 05:01:55 +00:00
naruse 9a7c25abab * ext/digest/*/*.[ch]: include ruby.h before digest.h to avoid
includeing ext/digest/extconf.h. [Bug #3231]
  https://msdn.microsoft.com/library/36k2cdd4.aspx

* 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://ci.ruby-lang.org/ruby/trunk@52694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-21 04:35:57 +00:00
nobu ac9d6b050b digest.c: GC guard
* ext/digest/digest.c (hexencode_str_new, rb_digest_base_update):
  prevent argument strings from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-21 05:03:55 +00:00
nobu 6fb9349d85 allocate structs with wrapper
* 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://ci.ruby-lang.org/ruby/trunk@50511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-16 12:56:48 +00:00
hsbt d9a2b3480e * doc/contributors.rdoc: fix a typo. Patch by @davydovanton
[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://ci.ruby-lang.org/ruby/trunk@50320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-15 01:37:47 +00:00
nobu 0b71264edb md5init.c: fix a typo
* ext/digest/md5/md5init.c: fix a typo, remove an extra
  underscore from a macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 04:58:22 +00:00
nobu b97ceb66e9 digest: CommonDigest
* ext/digest/digest_conf.rb (digest_conf): check for CommonDigest.
* ext/digest/*/*cc.h: for Apple CommonCrypto/CommonDigest.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 02:09:55 +00:00
nobu 935275bb59 digest: define Finish func from Final func
* ext/digest/digest.h (DEFINE_FINISH_FUNC_FROM_FINAL): macro for
  finish functions, by inverting arguments order.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 02:09:23 +00:00
nobu b632ca436c digest: common configurations
* ext/digest/digest_conf.rb (digest_conf): extract common
  configurations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 02:08:50 +00:00
nobu 4068d9089a digest: no ID cache
* ext/digest/*/*init.c: no need to cache interned IDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10 23:37:08 +00:00
akr ecedd3b224 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19 13:34:54 +00:00
nobu e580a631be use 0 for reserved
use 0 for rb_data_type_t::reserved instead of NULL, since its type
may be changed in the future and possibly not a pointer type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 06:38:04 +00:00
akr 6ca202fcee Update dependency.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 03:04:44 +00:00
akr dd547e1b22 Mark auogenerated part.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:14:08 +00:00
akr 57682b05e1 * common.mk: Remove comments in Dependency lines.
Notified by usa.

* enc/depend: Ditto.

* ext/**/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 10:28:25 +00:00
akr 8727eb77be * tool/update-deps: Extend to fix dependencies.
* common.mk: Dependencies updated by tool/update-deps.

* enc/depend: Ditto.

* ext/**/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 05:15:49 +00:00
knu c02fa39463 Make Digest() thread-safe.
* ext/digest/lib/digest.rb (Digest()): This function should now be
  thread-safe.  If you have a problem with regard to on-demand
  loading under a multi-threaded environment, preload "digest/*"
  modules on boot or use this method instead of directly
  referencing Digest::*. [Bug #9494]
  cf. https://github.com/aws/aws-sdk-ruby/issues/525

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 13:21:51 +00:00
nobu bb318692a6 digest/*/extconf.rb: do not link openssl when using bundled
* ext/digest/{md5,rmd160,sha1,sha2}/extconf.rb: configure OpenSSL
  only if bundled libraries is not used, so that OpenSSL is not
  linked unnecessarily.  [ruby-core:65404] [Bug #10324]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-05 02:03:55 +00:00
nobu 38dbbf33b0 rmd160/extconf.rb: fix function name
* ext/digest/rmd160/extconf.rb: fix transform function name to
  check.  [ruby-core:65091] [Bug #10252]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-05 01:38:52 +00:00
nobu b208e060f2 ext/digest: hide metadata objects for internal use
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30 08:29:02 +00:00
nobu 28b9f11d5a protoize no-arguments functions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30 05:25:32 +00:00
nobu 2f2f92b73e digest: no check for hidden objects
* ext/digest/digest.c (get_digest_base_metadata): metadata objects
  are hidden from ruby level.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-29 12:17:47 +00:00
nobu c47b523246 ruby.h: warn untyped Data
* include/ruby/ruby.h (rb_data_object_alloc_warning): warn
  Data_Wrap_Struct and Data_Make_Struct only if
  RUBY_UNTYPED_DATA_WARNING is set to 1.

* include/ruby/ruby.h (rb_data_object_get_warning): ditto for
  Data_Get_Struct.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-28 15:27:24 +00:00
nobu 15ae462d8b digest.c: typed data
* ext/digest/digest.c (rb_digest_base_alloc): use typed data.

* ext/digest/digest.c (rb_digest_base_copy): fail unless original
  object has same algorithm.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27 01:30:16 +00:00
nobu 5dbe603f09 Revert r46828
r46828 "md5ossl.c: indicate the result" caused segfaults.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 15:43:03 +00:00