summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-24 04:49:18 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-24 04:49:18 +0000
commit643f90d8db0a10c86ba5922fc48731d06edfcf6b (patch)
treeb1243268e29368e0f8353fc523664f98033097e4
parent90d74620c2b0ad10f4510cefa90cd380393faa5c (diff)
* ext/openssl/ossl_rand.c (ossl_rand_egd_bytes): use NUM2INT because
the result is used with functions whose argument is int. * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_purpose): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_trust): ditto. * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_purpose): ditto. * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_trust): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog15
-rw-r--r--ext/openssl/ossl_rand.c2
-rw-r--r--ext/openssl/ossl_ssl.c2
-rw-r--r--ext/openssl/ossl_x509store.c8
4 files changed, 21 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1843641deb..ea9a4a4e6c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Thu Mar 24 11:48:19 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/openssl/ossl_rand.c (ossl_rand_egd_bytes): use NUM2INT because
+ the result is used with functions whose argument is int.
+
+ * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): ditto.
+
+ * ext/openssl/ossl_x509store.c (ossl_x509store_set_purpose): ditto.
+
+ * ext/openssl/ossl_x509store.c (ossl_x509store_set_trust): ditto.
+
+ * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_purpose): ditto.
+
+ * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_trust): ditto.
+
Thu Mar 24 11:36:55 2011 NARUSE, Yui <naruse@ruby-lang.org>
* ext/openssl/ossl_x509name.c: id_aref's type is ID.
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c
index 92f5aaab53..7d4e0b8a10 100644
--- a/ext/openssl/ossl_rand.c
+++ b/ext/openssl/ossl_rand.c
@@ -149,7 +149,7 @@ ossl_rand_egd(VALUE self, VALUE filename)
static VALUE
ossl_rand_egd_bytes(VALUE self, VALUE filename, VALUE len)
{
- long n = NUM2INT(len);
+ int n = NUM2INT(len);
SafeStringValue(filename);
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index e5cce0f0e8..fd451b376d 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -630,7 +630,7 @@ ossl_sslctx_setup(VALUE self)
if(!NIL_P(val)) SSL_CTX_set_timeout(ctx, NUM2LONG(val));
val = ossl_sslctx_get_verify_dep(self);
- if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2LONG(val));
+ if(!NIL_P(val)) SSL_CTX_set_verify_depth(ctx, NUM2INT(val));
val = ossl_sslctx_get_options(self);
if(!NIL_P(val)) SSL_CTX_set_options(ctx, NUM2LONG(val));
diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c
index e7856485ca..5d341c5192 100644
--- a/ext/openssl/ossl_x509store.c
+++ b/ext/openssl/ossl_x509store.c
@@ -170,7 +170,7 @@ ossl_x509store_set_purpose(VALUE self, VALUE purpose)
{
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
X509_STORE *store;
- long p = NUM2LONG(purpose);
+ int p = NUM2INT(purpose);
GetX509Store(self, store);
X509_STORE_set_purpose(store, p);
@@ -186,7 +186,7 @@ ossl_x509store_set_trust(VALUE self, VALUE trust)
{
#if (OPENSSL_VERSION_NUMBER >= 0x00907000L)
X509_STORE *store;
- long t = NUM2LONG(trust);
+ int t = NUM2INT(trust);
GetX509Store(self, store);
X509_STORE_set_trust(store, t);
@@ -526,7 +526,7 @@ static VALUE
ossl_x509stctx_set_purpose(VALUE self, VALUE purpose)
{
X509_STORE_CTX *store;
- long p = NUM2LONG(purpose);
+ int p = NUM2INT(purpose);
GetX509StCtx(self, store);
X509_STORE_CTX_set_purpose(store, p);
@@ -538,7 +538,7 @@ static VALUE
ossl_x509stctx_set_trust(VALUE self, VALUE trust)
{
X509_STORE_CTX *store;
- long t = NUM2LONG(trust);
+ int t = NUM2INT(trust);
GetX509StCtx(self, store);
X509_STORE_CTX_set_trust(store, t);