crypto: PBKDF2 works with `int` not `ssize_t`
authorFedor Indutny <fedor@indutny.com>
Tue, 23 Feb 2016 20:53:45 +0000 (15:53 -0500)
committerMyles Borins <mborins@us.ibm.com>
Mon, 21 Mar 2016 19:57:59 +0000 (12:57 -0700)
commit97e95d04c2071acf09051a5b1da6eff75e498223
treea46c650d2b63b5c5534c18d9aa1759c7f984a815
parentdff7091fce47b7686aa029fd5c2a49e884e9ea86
crypto: PBKDF2 works with `int` not `ssize_t`

Change types of all PBKDF2 params to `int` as they are `int` in `evp.h`.

Check that `raw_keylen` fits into `int` before passing it to OpenSSL.

Fix: #5396
PR-URL: https://github.com/nodejs/node/pull/5397
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
src/node_crypto.cc
test/parallel/test-crypto-pbkdf2.js