Skip to content

Commit

Permalink
* ext/openssl/ossl.h: Make SSL_SESSION_cmp use CRYPTO_memcmp
Browse files Browse the repository at this point in the history
  [fix rubyGH-591] Patch by @PiPeep
* ext/openssl/ossl_ssl_session.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
hsbt committed Jan 3, 2015
1 parent 2b3b80c commit c2aef51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Sat Jan 3 10:14:51 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>

* 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@gmail.com>

* ext/fiddle/lib/fiddle/cparser.rb: Support for Fiddle::CParser
Expand Down
1 change: 1 addition & 0 deletions ext/openssl/ossl.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ extern "C" {
#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)
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/ossl_ssl_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b)
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

Expand Down

0 comments on commit c2aef51

Please sign in to comment.