crypto: Improve error checking and reporting
authorStefan Budeanu <stefan@budeanu.com>
Mon, 9 Nov 2015 00:18:55 +0000 (19:18 -0500)
committerJames M Snell <jasnell@gmail.com>
Wed, 23 Dec 2015 16:38:33 +0000 (08:38 -0800)
commitf7643eed00df20b6ea099c03b21524aa7ed40431
treea8cafbeac669bd3ad0ca786a231147fb782028ed
parentb92f05a3f90daceacbcde6c0e6386f632d35bb38
crypto: Improve error checking and reporting

Added checks where necessary to prevent hard crashes and gave
precedence to returning the OpenSSL error strings instead of generic
error strings.

PR-URL: https://github.com/nodejs/node/pull/3753
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
src/node_crypto.cc