1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
naruse 2011-03-24 04:49:18 +00:00
parent 90d74620c2
commit 643f90d8db
4 changed files with 21 additions and 6 deletions

View file

@ -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.

View file

@ -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);

View file

@ -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));

View file

@ -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);