Switching to AES only in secure socket