models.py 文件源码

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

项目:django-x509 作者: openwisp 项目源码 文件源码
def _verify_ca(self):
        """
        (internal use only)
        verifies the current x509 is signed
        by the associated CA
        """
        store = crypto.X509Store()
        store.add_cert(self.ca.x509)
        store_ctx = crypto.X509StoreContext(store, self.x509)
        try:
            store_ctx.verify_certificate()
        except crypto.X509StoreContextError as e:
            raise ValidationError(_("CA doesn't match, got the "
                                    "following error from pyOpenSSL: \"%s\"") % e.args[0][2])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号