diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-25 01:49:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-25 01:49:59 +0000 |
commit | 483bfa27e8aee08f0d6d5cc822733f85d03a55b9 (patch) | |
tree | 9f0163e4668c09a59d07c599fbd2f06a4fb2de61 | |
parent | a0484364619d72426dff1c13d028aa87b1a82a60 (diff) | |
download | ruby-483bfa27e8aee08f0d6d5cc822733f85d03a55b9.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/openssl/ossl_pkcs5.c | 5 |
2 files changed, 8 insertions, 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. diff --git a/ext/openssl/ossl_pkcs5.c b/ext/openssl/ossl_pkcs5.c index 18d166d1ca..7abcebfeb3 100644 --- a/ext/openssl/ossl_pkcs5.c +++ b/ext/openssl/ossl_pkcs5.c @@ -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; |