joyent/node — pull request #5875 by mscdex (2013-07-19 23:35:00+00:00)
Title: crypto: do not throw error if one isn't set

An issue was reported by cipherboy on IRC where calling final() with the gcm cipher would result in EVP_CipherFinal_ex() returning 0, but ERR_get_error() also returned 0 (indicating no error is in the queue).

The condition I've modified specifically for DecipherFinal should probably also be done for anywhere else we check for an error for throwing purposes (and in non-throwing cases too?).