Skip to content

Commit

Permalink
Add assertion in X509Data construction
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Apr 24, 2024
1 parent b42c093 commit 9f06f43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions signxml/signer.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ def _add_key_info(self, sig_root, signing_settings: SigningSettings):
self._serialize_key_value(signing_settings.key, key_info)

if signing_settings.cert_chain is not None:
assert len(signing_settings.cert_chain) > 0
x509_data = SubElement(key_info, ds_tag("X509Data"))
for cert in signing_settings.cert_chain:
x509_certificate = SubElement(x509_data, ds_tag("X509Certificate"))
Expand Down

0 comments on commit 9f06f43

Please sign in to comment.