ruby-changes:37031
From: hsbt <ko1@a...>
Date: Sat, 3 Jan 2015 10:15:07 +0900 (JST)
Subject: [ruby-changes:37031] hsbt:r49112 (trunk): * ext/openssl/ossl.h: Make `SSL_SESSION_cmp` use `CRYPTO_memcmp`
hsbt 2015-01-03 10:14:56 +0900 (Sat, 03 Jan 2015) New Revision: 49112 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49112 Log: * ext/openssl/ossl.h: Make `SSL_SESSION_cmp` use `CRYPTO_memcmp` [fix GH-591] Patch by @PiPeep * ext/openssl/ossl_ssl_session.c: ditto. Modified files: trunk/ChangeLog trunk/ext/openssl/ossl.h trunk/ext/openssl/ossl_ssl_session.c Index: ChangeLog =================================================================== --- ChangeLog (revision 49111) +++ ChangeLog (revision 49112) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Jan 3 10:14:51 2015 SHIBATA Hiroshi <shibata.hiroshi@g...> + + * ext/openssl/ossl.h: Make `SSL_SESSION_cmp` use `CRYPTO_memcmp` + [fix GH-591] Patch by @PiPeep + * ext/openssl/ossl_ssl_session.c: ditto. + Sat Jan 3 09:54:32 2015 SHIBATA Hiroshi <shibata.hiroshi@g...> * ext/fiddle/lib/fiddle/cparser.rb: Support for Fiddle::CParser Index: ext/openssl/ossl.h =================================================================== --- ext/openssl/ossl.h (revision 49111) +++ ext/openssl/ossl.h (revision 49112) @@ -64,6 +64,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.h#L64 #include <openssl/rand.h> #include <openssl/conf.h> #include <openssl/conf_api.h> +#include <openssl/crypto.h> #undef X509_NAME #undef PKCS7_SIGNER_INFO #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_EVP_CIPHER_CTX_ENGINE) Index: ext/openssl/ossl_ssl_session.c =================================================================== --- ext/openssl/ossl_ssl_session.c (revision 49111) +++ ext/openssl/ossl_ssl_session.c (revision 49112) @@ -79,7 +79,7 @@ int SSL_SESSION_cmp(const SSL_SESSION *a https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_ssl_session.c#L79 if (a->ssl_version != b->ssl_version || a->session_id_length != b->session_id_length) return 1; - return memcmp(a->session_id,b-> session_id, a->session_id_length); + return CRYPTO_memcmp(a->session_id, b->session_id, a->session_id_length); } #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/