def validate_schema(self): """ Ensure certificates are valid v1.2 schema :return: """ for _, certificate in self.certificates_to_issue.items(): with open(certificate.signed_cert_file_name) as cert: cert_json = json.load(cert) validate_unsigned_v1_2(cert_json)
def test_v1_2_unsigned(self): with open('../examples/1.2/sample_unsigned_cert-1.2.json') as data_f: data = json.load(data_f) valid = validate_unsigned_v1_2(data['document']) self.assertTrue(valid)
def validate_certificate(self, certificate_metadata): with open(certificate_metadata.unsigned_cert_file_name) as cert: certificate_json = json.load(cert) validate_unsigned_v1_2(certificate_json)