Added check cert and connect SSL on client side.