Fixed encryption-related crashes

Added checks to make sure the proxy logs info, and doesn't crash, when a client tries to connect with incorrect encryption settings

Change-Id: I660fd415c1983668949cd534525f3259f9867d2f