Example #1
0
 def sign_with_parent(self, private_key):
     if self._source_object:
         doc = etree.fromstring(self._source_object)
     else:
         doc = self.to_xml()
     self.parent_signature = create_relayable_signature(private_key, doc)
     add_element_to_doc(doc, "parent_author_signature", self.parent_signature)
     self.outbound_doc = doc
Example #2
0
 def sign(self, private_key):
     self.signature = create_relayable_signature(private_key, self.to_xml())
Example #3
0
def test_create_relayable_signature():
    doc = etree.XML(XML)
    signature = create_relayable_signature(get_dummy_private_key(), doc)
    assert signature == SIGNATURE3