def common_model_cn_extraction(g: dict) -> list:
    """
    Loops through all keys in the already converted model in order to find domains
    :param g: dictionary of generic model
    :return: list of domain objects
    """
    domains = []
    for key, value in g.items():
        if not isinstance(value, dict):
            continue

        if "tls" in value.keys():
            cns = value["tls"].get("certificate", {}).get("subject", {}).get("common_name", None) or list()
            for cn in cns:
                # Sloppy check if this is a real domain
                if "." in cn:
                    domains.append({"type": "common_name", "value": cn})
    return domains