Limit SSL_write bufsize to avoid OverflowErrors (#603)

* limit SSL_write bufsize to avoid OverflowErrors

* fix .send() truncation, add test
2 files changed