[ruby-cvs:70014] usa:r62885 (ruby_2_3): merge https://github.com/ruby/openssl/commit/3af2635f117f8da563d180bc1c58702aecb16e0c

usa at ruby-lang.org usa at ruby-lang.org
Thu Mar 22 12:33:57 JST 2018


usa	2018-03-22 12:33:56 +0900 (Thu, 22 Mar 2018)

  New Revision: 62885

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62885

  Log:
    merge https://github.com/ruby/openssl/commit/3af2635f117f8da563d180bc1c58702aecb16e0c
    patched by Kazuki Yamaguchi <k at rhe.jp>
    
    bio: prevent possible GC issue in ossl_obj2bio()
    
    Prevent the new object created by StringValue() from being GCed.
    Luckily, as none of the callers of ossl_obj2bio() reads from the
    returned BIO after possible triggering GC, this has not been a real
    problem.
    
    As a bonus, ossl_protect_obj2bio() function which is no longer used
    anywhere is removed.
    
    merge https://github.com/ruby/openssl/commit/f842b0d5c5e37527c11954a4b7a98c8d9cc57865
    patched by Kazuki Yamaguchi <k at rhe.jp>
    
    bio: do not use the FILE BIO method in ossl_obj2bio()
    
    Read everything from an IO object into a String first and use the
    memory buffer BIO method just as we do for String inputs.
    
    For MSVC builds, the FILE BIO method uses the "UPLINK" interface that
    requires the application to provide OPENSSL_Applink() function. For us,
    the "application" means ruby.exe, in which we can't do anything. As a
    workaround, avoid using the FILE BIO method at all.
    
    Usually private keys or X.509 certificates aren't that large and the
    temporarily increased memory usage hopefully won't be an issue.
    
    ext/openssl/ossl_version.h (OpenSSL::VERSION): bump to 1.1.1.

  Modified files:
    branches/ruby_2_3/ChangeLog
    branches/ruby_2_3/ext/openssl/ossl_bio.c
    branches/ruby_2_3/ext/openssl/ossl_bio.h
    branches/ruby_2_3/ext/openssl/ossl_config.c
    branches/ruby_2_3/ext/openssl/ossl_pkcs12.c
    branches/ruby_2_3/ext/openssl/ossl_pkcs7.c
    branches/ruby_2_3/ext/openssl/ossl_pkey.c
    branches/ruby_2_3/ext/openssl/ossl_pkey_dh.c
    branches/ruby_2_3/ext/openssl/ossl_pkey_dsa.c
    branches/ruby_2_3/ext/openssl/ossl_pkey_ec.c
    branches/ruby_2_3/ext/openssl/ossl_pkey_rsa.c
    branches/ruby_2_3/ext/openssl/ossl_ssl_session.c
    branches/ruby_2_3/ext/openssl/ossl_version.h
    branches/ruby_2_3/ext/openssl/ossl_x509cert.c
    branches/ruby_2_3/ext/openssl/ossl_x509crl.c
    branches/ruby_2_3/ext/openssl/ossl_x509req.c
    branches/ruby_2_3/test/openssl/test_x509cert.rb
    branches/ruby_2_3/version.h


More information about the ruby-cvs mailing list