aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ssl_session.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-23 08:37:55 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-23 08:37:55 +0000
commit6f7b5ffe6f5f33d841e4f8d58214b685023118fa (patch)
tree0dbfd9d03c66e975a2d8753ec007af91c3025dd4 /ext/openssl/ossl_ssl_session.c
parenta909ff22c8086e695ac010aa9f36723ce6674097 (diff)
downloadruby-6f7b5ffe6f5f33d841e4f8d58214b685023118fa.tar.gz
* ext/openssl/ossl_config.c: OpenSSL 1.0.0 support.
* ext/openssl/extconf.rb: check some functions added/removed at OpenSSL 1.0.0. * ext/openssl/ossl_engine.c (ossl_engine_s_load): use engines which exists. * ext/openssl/ossl_ssl_session (SSL_SESSION_cmp): removed at 1.0.0, so implement compatible fuction here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_ssl_session.c')
-rw-r--r--ext/openssl/ossl_ssl_session.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/openssl/ossl_ssl_session.c b/ext/openssl/ossl_ssl_session.c
index 21aafede9c..26a1f67f55 100644
--- a/ext/openssl/ossl_ssl_session.c
+++ b/ext/openssl/ossl_ssl_session.c
@@ -72,6 +72,16 @@ static VALUE ossl_ssl_session_initialize(VALUE self, VALUE arg1)
return self;
}
+#if HAVE_SSL_SESSION_CMP == 0
+static 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);
+}
+#endif
+
/*
* call-seq:
* session1 == session2 -> boolean