fix openssl operations on non blocking socket