lazy get SSL state from socket
(cherry picked from commit 5e2233c)