test_acme_util.py 文件源码

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

项目:marathon-acme 作者: praekeltfoundation 项目源码 文件源码
def test_key_not_exists(self, pem_path):
        """
        When we get the client key and no key file exists, a new key should be
        generated and the key should be saved in a key file.
        """
        key = maybe_key(pem_path)

        pem_file = pem_path.child(u'client.key')
        assert_that(pem_file.exists(), Equals(True))

        file_key = serialization.load_pem_private_key(
            pem_file.getContent(),
            password=None,
            backend=default_backend()
        )
        file_key = JWKRSA(key=file_key)

        assert_that(key, Equals(file_key))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号