fix bug in sniffer with SNI using the key from ctx rather than the session