From 483bfa27e8aee08f0d6d5cc822733f85d03a55b9 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 25 Dec 2010 01:49:59 +0000 Subject: * 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 --- ChangeLog | 4 ++++ ext/openssl/ossl_pkcs5.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 03d196412f..c3f6d12847 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Dec 25 10:49:56 2010 Nobuyoshi Nakada + + * ext/openssl/ossl_pkcs5.c (ossl_pkcs5_pbkdf2_hmac): add casts. + Fri Dec 24 08:46:04 2010 Tanaka Akira * 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; -- cgit v1.2.3