예제 #1
0
    def test_update_core_cert(self):
        isd = ISD.objects.get(isd_id=19)
        utils.check_trc_and_certs(self,
                                  19,
                                  self.isd19_core_ases,
                                  expected_version=1)

        AS.update_core_as_keys(isd.ases.filter(is_core=True))
        utils.check_trc_and_certs(self,
                                  19,
                                  self.isd19_core_ases,
                                  expected_version=2)
예제 #2
0
    def test_update_core_cert(self):
        isd = ISD.objects.get(isd_id=19)

        trc_v1 = utils.check_trc(self,
                                 isd,
                                 self.isd19_core_ases,
                                 expected_version=1)

        AS.update_core_as_keys(isd.ases.filter(is_core=True))

        trc_v2 = utils.check_trc(self,
                                 isd,
                                 self.isd19_core_ases,
                                 expected_version=2)
        trc_v2.verify(trc_v1)
        utils.check_core_as_certs(self, isd)

        # Certs for non-core ASes not updated; will be updated as new TRC is disseminated
        for as_ in isd.ases.filter(is_core=False).iterator():
            self.assertEqual(as_.certificate_chain['0']['TRCVersion'],
                             trc_v1.version)
예제 #3
0
파일: admin.py 프로젝트: lschulz/scionlab
 def update_core_keys(self, request, queryset):
     """
     Updates the core keys and update the corresponding TRCs and certificates.
     """
     AS.update_core_as_keys(queryset)
예제 #4
0
def update_core_keys(as_ids):
    from scionlab.models.core import AS

    ases = AS.objects.filter(as_id__in=as_ids)
    AS.update_core_as_keys(ases)