Buffer overflow in ssl

Buffer overflow issue was handled in plain connection and was missied
when dealing with ssl engine. This patch fixes it.


Bug-Url: https://bugzilla.redhat.com/1115152
Change-Id: I4f7d964157c449b9a0744666e7308559f08fe1da
Signed-off-by: pkliczewski <piotr.kliczewski@gmail.com>