lcpl_test_suite.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:lcp-testing-tools 作者: edrlab 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号