def extract_cert_secret(key, device):
    """
    Check if device is marked as secret.

    :param key: Device entry.
    :type key: dict

    :param device: HWID, FCCID or name of device.
    :param device: str
    """
    not_secret = device in key['name'] and 'secret' not in key
    return not_secret
