diff options
author | Heikki Toivonen <heikki@heikkitoivonen.net> | 2006-09-06 18:38:56 +0000 |
---|---|---|
committer | Heikki Toivonen <heikki@heikkitoivonen.net> | 2006-09-06 18:38:56 +0000 |
commit | b7e9dba7a4336b852b602d697883828b934f83b1 (patch) | |
tree | 1b9da331a5ecdb99e27c2ddd28eb4c53e3399ba8 /tests/test_smime.py | |
parent | d7c49ef53215349f1c5e2fc1f8f7aa778c7307e7 (diff) | |
download | m2crypto-b7e9dba7a4336b852b602d697883828b934f83b1.tar.gz |
Bug 5929, SMIME.smime_load_pkcs7_bio failed with memory BIO.
Made it automatically call BIO_set_mem_eof_return for memory
BIOs, as explained in the OpenSSL FAQ.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@469 2715db39-9adf-0310-9c64-84f055769b4b
Diffstat (limited to 'tests/test_smime.py')
-rw-r--r-- | tests/test_smime.py | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/tests/test_smime.py b/tests/test_smime.py index 09327cd..3b528f0 100644 --- a/tests/test_smime.py +++ b/tests/test_smime.py @@ -153,26 +153,7 @@ class SMIMETestCase(unittest.TestCase): s.load_key('recipient_key.pem', 'recipient.pem') - if 1: - f = open('smime_test.txt', 'wb') - f.write(signedEncrypted.read()) - f.close() - p7, data = SMIME.smime_load_pkcs7('smime_test.txt') - import os - os.remove('smime_test.txt') - else: -# f = open('smime_test.txt', 'wb') -# f.write(signedEncrypted.read()) -# f.close() -# p7, data = SMIME.smime_load_pkcs7('smime_test.txt') -# -# f = open('smime_test.txt', 'rb') -# t = f.read() -# #print t -# signedEncrypted = BIO.MemoryBuffer(t) -# f.close() - # XXX Bug: "not enough data" with straight bio? - p7, data = SMIME.smime_load_pkcs7_bio(signedEncrypted) + p7, data = SMIME.smime_load_pkcs7_bio(signedEncrypted) out = s.decrypt(p7) |