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

207 Коммитов

Автор SHA1 Сообщение Дата
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
nobu 2d33fc97a3 md5ossl.c: indicate the result
* ext/digest/md5/md5ossl.c: use OpenSSL EVP API instead of MD5 API
  to perform MD5 hashes using OpenSSL in ext/digest.
  [ruby-core:61614] [Bug #9659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 14:59:32 +00:00
nobu aadebb29da ext/digest: return values of init and final
* ext/digest: make built-in digest function implementations
  indicate success or failure of init and final functions.
  [ruby-core:61614] [Bug #9659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 14:59:20 +00:00
nobu 6046b9f149 digest.c: raise exception on init failure
* ext/digest/digest.c: expect digest init and finish functions to
  indicate success or failure; raise exception on failure.
  [ruby-core:61614] [Bug #9659]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-15 14:58:53 +00:00
knu e2e4ac3a8f Digest::HMAC is finally removed as previously noticed. [fix GH-648]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-01 07:21:08 +00:00
nobu 635178762d digest.c: call to_s once
* ext/digest/digest.c (rb_digest_instance_equal): no need to call
  `to_s` twice.  [Bug #9913]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-07 03:29:00 +00:00
eregon bc211f3634 digest.c: fix #== for non-string arguments
* ext/digest/digest.c (rb_digest_instance_equal):
  fix #== for non-string arguments. [ruby-core:62967] [Bug #9913]
* test/digest/test_digest.rb: add test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-06 21:05:48 +00:00
hsbt a5afd23577 * ext/digest/lib/digest/hmac.rb: extracted inline tests into test dir.
* test/digest/test_digest_hmac.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-31 07:30:34 +00:00
zzak 8a53b57584 * ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21 07:53:39 +00:00
zzak 4c1e390fa8 * ext/digest/*: [DOC] Fix several typos and broken http links.
Improved examples for Digest overview and fixed a broken example in
  Digest::HMAC overview. This patch also adds a description of
  Digest::SHA256.bubblebabble to the Digest overview.

  Patched by @stomar [Bug #9027]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-13 10:09:28 +00:00
zzak 017a975ec2 * ext/digest/digest.c: [DOC] typo in overview by @chastell
[Fixes GH-399] https://github.com/ruby/ruby/pull/399


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-26 13:04:27 +00:00
nobu 3f78d84661 Eliminate less-than-zero checks for unsigned variables
* ext/bigdecimal/bigdecimal.c, ext/digest/md5/md5.c,
  ext/json/fbuffer/fbuffer.h, ext/json/generator/generator.c:
  Eliminate less-than-zero checks for unsigned variables.
  According to section 4.1.5 of C89 standard, size_t is an unsigned
  type.  These checks were found with 'cppcheck' static analysis tool.
  [ruby-core:57117] [Feature #8890]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-12 13:37:11 +00:00
knu 07a6b4cbb5 * ext/digest/lib/digest.rb (Digest::Class.file): Take optional
arguments that are passed to the constructor of the digest
  class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-21 12:41:34 +00:00
akr b47138580c * lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,
ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile.

* ext/-test-/old_thread_select/depend: Update dependencies.

* ext/-test-/wait_for_single_fd/depend: Ditto.

* ext/bigdecimal/depend: Ditto.

* ext/curses/depend: Ditto.

* ext/digest/bubblebabble/depend: Ditto.

* ext/digest/depend: Ditto.

* ext/digest/md5/depend: Ditto.

* ext/digest/rmd160/depend: Ditto.

* ext/digest/sha1/depend: Ditto.

* ext/digest/sha2/depend: Ditto.

* ext/dl/callback/depend: Ditto.

* ext/dl/depend: Ditto.

* ext/etc/depend: Ditto.

* ext/nkf/depend: Ditto.

* ext/objspace/depend: Ditto.

* ext/pty/depend: Ditto.

* ext/readline/depend: Ditto.

* ext/ripper/depend: Ditto.

* ext/sdbm/depend: Ditto.

* ext/socket/depend: Ditto.

* ext/stringio/depend: Ditto.

* ext/strscan/depend: Ditto.

* ext/syslog/depend: Ditto.

* ext/-test-/num2int/depend: Removed.

* ext/dbm/depend: Ditto.

* ext/fcntl/depend: Ditto.

* ext/gdbm/depend: Ditto.

* ext/racc/cparse/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13 00:46:29 +00:00
nobu 3eb4b0aa06 sha2.c: suppress warnings
* ext/digest/sha2/sha2.c (SHA256_Final, SHA512_Last): suppress
  strict-aliasing warnings on gcc 4.8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 09:39:19 +00:00
nobu f0a229b69b extconf.rb: git rid of post-1.8 feature
* ext/digest/*/extconf.rb, ext/openssl/extconf.rb: get git rid of
  post-1.8 feature require_relative for cross compilation.
  [ruby-core:50160] [Bug #7439]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27 00:58:52 +00:00
eregon 61b624d149 ext/digest/digest.c (hexencode_str_new): return an ASCII string
* test/digest: tests for all kind of digests encodings
  [ruby-core:46792][Bug #6799]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-01 13:30:51 +00:00
nobu cc3f33073d rmd160.c: fix for huge data
* ext/digest/rmd160/rmd160.c (RMD160_Update): fix for huge data.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 01:27:59 +00:00