'alert when an SSL listener is not using the latest reference policy.'

def check_listener_reference_policy(self, elb_item):

    policy_port_map = defaultdict(list)
    for listener in elb_item.config.get('ListenerDescriptions'):
        if (len(listener.get('PolicyNames', [])) > 0):
            for name in listener.get('PolicyNames', []):
                policy_port_map[name].append(listener['LoadBalancerPort'])
    policies = elb_item.config.get('PolicyDescriptions')
    for (policy_name, policy) in policies.items():
        policy_type = policy.get('type', None)
        if (policy_type and (policy_type == 'SSLNegotiationPolicyType')):
            reference_policy = policy.get('reference_security_policy', None)
            self._process_reference_policy(reference_policy, policy_name, json.dumps(policy_port_map[policy_name]), elb_item)
            if (not reference_policy):
                self._process_custom_listener_policy(policy_name, policy, json.dumps(policy_port_map[policy_name]), elb_item)
