summaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_x509store.c
diff options
context:
space:
mode:
authornaruse <naruse@ruby-lang.org>2011-03-24 04:49:18 +0000
committernaruse <naruse@ruby-lang.org>2011-03-24 04:49:18 +0000
commitd0696c1d9c63f151978d96e7bcdf9f8435088f5f (patch)
tree3b026a8431948b0ea8ce82f90ba0a0ad42457685 /ext/openssl/ossl_x509store.c
parente5cd64231589c60e675707e514b21e751a6d3eb0 (diff)
downloadruby-openssl-history-d0696c1d9c63f151978d96e7bcdf9f8435088f5f.tar.gz
* 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
Diffstat (limited to 'ext/openssl/ossl_x509store.c')
-rw-r--r--ext/openssl/ossl_x509store.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c
index e785648..5d341c5 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);