Skip to content

Commit

Permalink
disable certificate validation for SI test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekram committed Nov 1, 2020
1 parent 1f62d26 commit 8e811cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions pyas2lib/as2.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,8 +978,9 @@ def detect_mdn(self):
if part.get_content_type() == "message/disposition-notification":
mdn = part.get_payload()[0]
message_id = mdn.get("Original-Message-ID").strip("<>")
if mdn.get("Original-Recipient"):
message_recipient = mdn.get("Original-Recipient").split(";")[1].strip()
else:
message_recipient = mdn.get("Final-Recipient").split(";")[1].strip()
message_recipient = None
if "Original-Recipient" in mdn:
message_recipient = mdn["Original-Recipient"].split(";")[1].strip()
elif "Final-Recipient" in mdn:
message_recipient = mdn["Final-Recipient"].split(";")[1].strip()
return message_id, message_recipient
2 changes: 1 addition & 1 deletion pyas2lib/tests/test_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def setUp(self):
verify_cert_ca=self.sb2bi_public_ca,
encrypt_cert=self.sb2bi_public_key,
encrypt_cert_ca=self.sb2bi_public_ca,
validate_certs=False
validate_certs=False,
)
self.partner.load_verify_cert()
self.partner.load_encrypt_cert()
Expand Down

0 comments on commit 8e811cb

Please sign in to comment.