#10 Use XML C14n canonical form for all outgoing messages

Đã đóng
%! (template.HTML=4 năm trước cách đây)đang mở bởi stan · 2 ý kiến

The XML signature applies to the XML message in its C14n Canonical Form. We might as well make sure that the message templates already are in this form, to ease the signing process.

This does not guarantee that incoming messages will be in canonical form, however, so their should be a way to convert any message to its canonical form.

If this proves too difficult, we might as well rely on lxml for this process. I want to see whether we can do without this extra decode-encode step.

The XML signature applies to the XML message in its C14n Canonical Form. We might as well make sure that the message templates already are in this form, to ease the signing process. This does not guarantee that incoming messages will be in canonical form, however, so their should be a way to convert any message to its canonical form. If this proves too difficult, we might as well rely on `lxml` for this process. I want to see whether we can do without this extra decode-encode step.
Stan Janssen đã nhận xét 4 năm trước cách đây
Chủ sở hữu

Excellent write-up of the required steps to normalization: https://www.di-mgt.com.au/xmldsig-c14n.html

Excellent write-up of the required steps to normalization: https://www.di-mgt.com.au/xmldsig-c14n.html
Stan Janssen đã nhận xét 4 năm trước cách đây
Chủ sở hữu

So this turns out to be more of a hassle than I thought. Also, the standard-library xml.etree.ElementTree module contains a canonicalize method that takes a string and produces the canonical output without constructing an XML tree, which looks like what we need. Let's use that.

So this turns out to be more of a hassle than I thought. Also, the standard-library `xml.etree.ElementTree` module contains a `canonicalize` method that takes a string and produces the canonical output without constructing an XML tree, which looks like what we need. Let's use that.
Đăng nhập để tham gia bình luận.
Không có nhãn
Không có Milestone
Không có người được phân công
1 tham gia
Đang tải...
Hủy bỏ
Lưu
Ở đây vẫn chưa có nội dung nào.