1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
rhe f52ab6e494 openssl: improve handling of password for encrypted PEM
* ext/openssl/ossl.c (ossl_pem_passwd_value): Added. Convert the
  argument to String with StringValue() and validate the length is in
  4..PEM_BUFSIZE. PEM_BUFSIZE is a macro defined in OpenSSL headers.
  (ossl_pem_passwd_cb): When reading/writing encrypted PEM format, we
  used to pass the password to PEM_def_callback() directly but it was
  problematic. It is not NUL character safe. And surprisingly, it
  silently truncates the password to 1024 bytes.  [GH ruby/openssl#51]

* ext/openssl/ossl.h: Add function prototype declaration of newly
  added ossl_pem_passwd_value().

* ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): Use
  ossl_pem_passwd_value() to validate the password String.

* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_initialize, ossl_dsa_export):
  ditto.

* ext/openssl/ossl_pkey_ec.c (ossl_ec_key_initialize,
  ossl_ec_key_to_string): ditto.

* ext/openssl/ossl_pkey_rsa.c (ossl_rsa_initialize, ossl_rsa_export):
  ditto.

* test/openssl/test_pkey_{dsa,ec,rsa}.rb: test this.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20 15:05:25 +00:00
..
-ext- string.c: integer overflow 2016-05-18 05:52:40 +00:00
base64
benchmark
bigdecimal
cgi cgi/util.rb: remove CGI::Util#_unescape 2016-04-20 08:33:33 +00:00
coverage test_coverage.rb: suppress warnings 2016-04-11 05:13:31 +00:00
csv Use Integer instead of Fixnum and Bignum. 2016-05-17 13:15:57 +00:00
date Use Integer instead of Fixnum and Bignum. 2016-05-17 13:15:57 +00:00
dbm update comments. 2016-05-01 12:50:19 +00:00
digest
drb don't use keeper thread. [Bug #12342] 2016-05-15 11:59:00 +00:00
dtrace
erb
etc
excludes TestException.rb: suppress warning 2016-04-11 08:27:19 +00:00
fiddle * test_handle.rb: refine test_fallback_to_ansi 2016-05-16 06:26:56 +00:00
fileutils
gdbm update comments. 2016-05-01 12:50:19 +00:00
io io/console: unknown key code for names with nul 2016-04-15 01:07:14 +00:00
irb
json Use Integer instead of Fixnum and Bignum. 2016-05-17 13:15:57 +00:00
lib assertions.rb: leave timeout to invoke_ruby 2016-05-19 03:46:20 +00:00
logger * test/logger/test_logdevice.rb (TestLogDevice#test_shifting_period_suffix): 2016-05-01 14:56:45 +00:00
matrix
minitest Use Integer instead of Fixnum and Bignum. 2016-05-17 13:15:57 +00:00
misc
mkmf mkmf: Unquote directory strings 2016-03-24 16:10:43 +00:00
monitor
net * lib/net/http/header.rb (Net::HTTPHeader#{each_header,each_name, 2016-05-04 09:46:46 +00:00
nkf
objspace
open-uri * lib/open-uri.rb: Use userinfo for authenticated proxy. 2016-03-30 00:46:05 +00:00
openssl openssl: improve handling of password for encrypted PEM 2016-05-20 15:05:25 +00:00
optparse
ostruct
pathname
psych * test/psych/test_emitter.rb: test_resizing_tags missing 2016-02-22 23:22:39 +00:00
rdoc
readline
resolv
rexml Use Integer instead of Fixnum and Bignum. 2016-05-17 13:15:57 +00:00
rinda Sat Mar 5 09:17:54 2016 Rei Odaira <Rei.Odaira@gmail.com> 2016-03-05 00:29:39 +00:00
ripper
rss
ruby fix document of Regexp#match? 2016-05-19 12:23:57 +00:00
rubygems Use Integer instead of Fixnum and Bignum. 2016-05-17 13:15:57 +00:00
scanf
sdbm update comments. 2016-05-01 12:50:19 +00:00
shell
socket * test/socket/test_socket.rb (test_udp_recvmsg_truncation): 2016-03-10 00:55:37 +00:00
stringio stringio.c: warn block for new 2016-04-27 06:47:56 +00:00
strscan
syslog
testunit assertions.rb: leave timeout to invoke_ruby 2016-05-19 03:46:20 +00:00
thread Use Integer instead of Fixnum and Bignum. 2016-05-17 13:15:57 +00:00
uri
webrick webrick/utils.rb: suppress messages 2016-05-09 00:05:32 +00:00
win32ole test/win32ole/test_win32ole_variant.rb: use other than Integer 2016-05-18 02:05:30 +00:00
zlib * test/zlib/test_zlib.rb (test_adler32_combine, test_crc32_combine): 2016-03-04 22:20:56 +00:00
colors
runner.rb
test_abbrev.rb
test_cmath.rb
test_delegate.rb
test_find.rb find.rb: raise with the name 2016-02-19 14:38:28 +00:00
test_forwardable.rb
test_ipaddr.rb
test_mathn.rb
test_mutex_m.rb
test_observer.rb
test_open3.rb
test_pp.rb
test_prettyprint.rb
test_prime.rb
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb random.c: use bytes 2016-05-10 05:57:11 +00:00
test_set.rb * lib/set.rb (Set#{delete_if,keep_if,collect!,reject!,select!,classify,divide}, 2016-05-04 09:06:59 +00:00
test_shellwords.rb
test_singleton.rb
test_syslog.rb
test_tempfile.rb
test_time.rb * lib/time.rb: revert r54167 because it would break 2016-04-19 04:20:48 +00:00
test_timeout.rb
test_tmpdir.rb
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb