tls_wrap: fix error cb when fatal TLS Alert recvd
authorShigeki Ohtsu <ohtsu@iij.ad.jp>
Fri, 8 May 2015 04:35:47 +0000 (13:35 +0900)
committerFedor Indutny <fedor@indutny.com>
Sat, 16 May 2015 10:34:01 +0000 (12:34 +0200)
commit7c52e1c1f47ac9d2f15048c2606331e3e09c5f6c
tree0285c87ac4de9feed3351bbbc8142ea914e762cd
parente008e8faba34d6e5bd760e68cdff1f3fe0e04514
tls_wrap: fix error cb when fatal TLS Alert recvd

SSL_read() returns 0 when fatal TLS Alert is received.
Fix to invoke ssl error callback in this case.

PR-URL: https://github.com/nodejs/io.js/pull/1661
Reviewed-By: Fedor Indutny <fedor@indutny.com>
src/tls_wrap.cc
test/parallel/test-tls-alert-handling.js [new file with mode: 0644]