mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/openssl/ossl_pkcs5.c (ossl_pkcs5_pbkdf2_hmac): add casts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a048436461
commit
483bfa27e8
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Dec 25 10:49:56 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/openssl/ossl_pkcs5.c (ossl_pkcs5_pbkdf2_hmac): add casts.
|
||||
|
||||
Fri Dec 24 08:46:04 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c: parenthesize macro arguments.
|
||||
|
|
|
@ -36,7 +36,10 @@ ossl_pkcs5_pbkdf2_hmac(VALUE self, VALUE pass, VALUE salt, VALUE iter, VALUE key
|
|||
|
||||
str = rb_str_new(0, len);
|
||||
|
||||
if (PKCS5_PBKDF2_HMAC(RSTRING_PTR(pass), RSTRING_LEN(pass), RSTRING_PTR(salt), RSTRING_LEN(salt), NUM2INT(iter), md, len, RSTRING_PTR(str)) != 1)
|
||||
if (PKCS5_PBKDF2_HMAC(RSTRING_PTR(pass), RSTRING_LEN(pass),
|
||||
(unsigned char *)RSTRING_PTR(salt), RSTRING_LEN(salt),
|
||||
NUM2INT(iter), md, len,
|
||||
(unsigned char *)RSTRING_PTR(str)) != 1)
|
||||
ossl_raise(ePKCS5, "PKCS5_PBKDF2_HMAC");
|
||||
|
||||
return str;
|
||||
|
|
Loading…
Reference in a new issue