def test_validate_lcpl(self):
"""
Validate an LCP license file
"""
# validate the license using the JSON schema, includes:
# check the profile Value (basic or 1.0)
# check the encryption method (aes-cbc), user key (sha256) and signature algorithm (ecdsa-sha256)
lcpl_json_schema_path = os.path.join(
JSON_SCHEMA_DIR_PATH, 'lcpl_schema.json')
with open(lcpl_json_schema_path) as schema_file:
lcpl_json_schema = json.loads(schema_file.read())
try:
jsonschema.validate(self.lcpl, lcpl_json_schema)
except jsonschema.ValidationError as err:
raise TestSuiteRunningError(err)
评论列表
文章目录