本文整理汇总了Python中acme.challenges.KeyAuthorizationChallengeResponse.verify方法的典型用法代码示例。如果您正苦于以下问题:Python KeyAuthorizationChallengeResponse.verify方法的具体用法?Python KeyAuthorizationChallengeResponse.verify怎么用?Python KeyAuthorizationChallengeResponse.verify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类acme.challenges.KeyAuthorizationChallengeResponse
的用法示例。
在下文中一共展示了KeyAuthorizationChallengeResponse.verify方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_verify_wrong_form
# 需要导入模块: from acme.challenges import KeyAuthorizationChallengeResponse [as 别名]
# 或者: from acme.challenges.KeyAuthorizationChallengeResponse import verify [as 别名]
def test_verify_wrong_form(self):
from acme.challenges import KeyAuthorizationChallengeResponse
response = KeyAuthorizationChallengeResponse(
key_authorization=".foo.oKGqedy-b-acd5eoybm2f-NVFxvyOoET5CNy3xnv8WY"
)
self.assertFalse(response.verify(self.chall, KEY.public_key()))
示例2: test_verify_wrong_thumbprint
# 需要导入模块: from acme.challenges import KeyAuthorizationChallengeResponse [as 别名]
# 或者: from acme.challenges.KeyAuthorizationChallengeResponse import verify [as 别名]
def test_verify_wrong_thumbprint(self):
from acme.challenges import KeyAuthorizationChallengeResponse
response = KeyAuthorizationChallengeResponse(
key_authorization='foo.oKGqedy-b-acd5eoybm2f-NVFxv')
self.assertFalse(response.verify(self.chall, KEY.public_key()))