fix calls to openssl properly now. Only append \n to stdin when decoding. Updated the test slightly, also.
This commit is contained in:
@@ -595,6 +595,7 @@ class XenAPIDiffieHellmanTestCase(test.TestCase):
|
|||||||
def test_encryption(self):
|
def test_encryption(self):
|
||||||
msg = "This is a top-secret message"
|
msg = "This is a top-secret message"
|
||||||
enc = self.alice.encrypt(msg)
|
enc = self.alice.encrypt(msg)
|
||||||
|
self.assertFalse(enc.endswith('\n'))
|
||||||
dec = self.bob.decrypt(enc)
|
dec = self.bob.decrypt(enc)
|
||||||
self.assertEquals(dec, msg)
|
self.assertEquals(dec, msg)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user