Properly handle alerts from the peer in SSL_read.

We currently return 0 on them because OpenSSL returns 0 with an entry in the
error queue. (See bug.) This is completely insane, but it's how the API works
for now.

Add a test which causes the peer to return a fatal error. Extend
SSLClientSocketTest.Read to assert on the final exit code. This gives test
coverage for when the peer cleanly shuts down the connection.


Review URL:

Cr-Original-Commit-Position: refs/heads/master@{#321040}
Cr-Mirrored-Commit: e74aabdb96a388dd0f11c60552710fcfc6b86649
4 files changed