python - Python signxml 自定义命名空间
问题描述
我正在尝试更改在 python 中签署 xml 文档时 signxml 创建的命名空间。目前它使用 ds: 签署签名,我想将其更改为 dsig:
我在用
signed_root = XMLSigner(signature_algorithm='rsa-sha512',method=signxml.methods.envelope,digest_algorithm="sha512").sign(root, key=secret)
我得到类似的东西
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo><ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006 /12/xml-c14n11"/>
但需要它
<dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">dsig:SignedInfo<dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12 /xml-c14n11"/>
我确信这与命名空间有关,但找不到在哪里更改它
谢谢
解决方案
推荐阅读
- django - Elasticbeanstalk 应用程序是否会进入睡眠状态?
- responsive-design - 为什么我的网站的移动版本无法正常运行?
- python - 使用我的解决方案方法无法完整输出 METAR 数据列表
- authentication - 使用 django rest 框架的 X509 身份验证
- vue.js - asyncData() or fetch() does not work async, but in mounted it works correctly
- javascript - StripeCheckout:文本字符串必须在
零件 - python - 警告:忽略无效的分发 -ip (c:\python39\lib\site-packages) 我该如何解决这个问题,这是什么意思?
- minify - 十月CMS 缩小禁用
- html - 用于法律文本显示的自定义标记?也许更简单的选择?
- reactjs - React 和 Django 之间的身份验证,当两者都在不同的服务器上时