| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
* Replace unittest.makeSuite with unittest.TestLoader().loadTestsFromTestCase
* import unittest from relative import
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When OpenSSL encounters an error, M2Crypto prints only the "reason string"
(given by ERR_reason_error_string()). This string often contains only very
generic message. For example, for all certificate verification errors, the
string is the same "certificate verify error".
OpenSSL applications (e.g. the command-line utilities from OpenSSL
distribution) additionally show "optional text message" as given by
ERR_get_error_line_data(). This message contains more detailed error
reason, such as for example "certificate revoked".
Added this message (if given by OpenSSL) to the Python error text.
|
|
|
|
|
|
|
| |
Specially replace complicated construct with unittest2 to one import to
M2Crypto top module.
Also, Rand.load_file should have first parameter as bytes(), not str().
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Added wrapper over OpenSSL's X509_STORE_set_verify_cb(). It can be used
to set custom options for PKCS#7 verification.
|
|
|
|
|
|
| |
An optional parameter "algo" is added to SMIME.sign().
This is what is done by "-md" option in the command
"openssl smime -sign -md <digest_name> ..."
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
See #84, but we should really find a better algorithm, this is just an
ugly hack.
|
|
|
|
|
|
| |
And fix expected values to new certs.
Fix #77
|
|
|
|
|
|
|
| |
Just run
$ find . -name \*.py -exec sed -r -i -e "s/\t/ /g" '{}' \;
$ find . -name \*.py -exec sed -r -i -e "s/[ ]+$//" '{}' \;
|
| |
|
| |
|
|
|
|
|
| |
The test case uses OpenSSL’s default algorithm; the length 1243
corresponds to SHA-1, 1263 to SHA-256.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More comments and rationale is at
https://bugzilla.redhat.com/show_bug.cgi?id=565662
* Some algorithms are not available in FIPS mode, in particular MD5.
* Ignoring the error returned by HMAC_Init IIRC results in a NULL
deference.
* FIPS mode prohibits 512-bit RSA keys, so the tests have to increase
the key length.
* MD5 is prohibited in FIPS mode, had to use a different algorithm (and
different known answers) for testing HMAC.
* RC4 is unavailable in FIPS mode. Should probably use @unittest.skip
nowadays.
* The same goes for RIPEMD-160
|
|
|
|
| |
Fixes #48
|
|
|
|
|
|
| |
test_smime.py.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@721 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
| |
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@698 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
| |
now it is.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@673 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- EVP.load_key and load_key_bio fixed to raise EVP.EVPError and BIO.BIOError
- SSL.Session.load_session fixed to raise SSL.SSLError
- SMIME.load_pkcs7, load_pkcs7_bio, smime_load_pkcs7, smime_load_pkcs7_bio,
text_crlf, text_crlf_bio fixed to raise BIO.BIOError, SMIME.PKCS7_Error and
SMIME.SMIME_Error as appropriate
Additionally fixed:
- SMIME.text_crlf and text_crlf_bio were always raising TypeError
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@663 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
| |
m2.x509_store_load_locations call, and in case of error raises X509Error.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@610 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
| |
always causing a crash).
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@531 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
|
|
| |
for example:
python setup.py test --test-suite=tests.test_x509 -q
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@504 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
| |
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@496 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
| |
tests.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@491 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
signed and encrypted from memory does not seem to work.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@429 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
|
| |
potential memory leaks in load_pkcs7 and smime_load_pkcs7
(would leak bio objects if pkcs7 read failed).
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@425 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
|
| |
only when reading from file - reading from bio results in
error.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@424 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
|
|
| |
that one.
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@421 2715db39-9adf-0310-9c64-84f055769b4b
|
|
|
|
| |
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@416 2715db39-9adf-0310-9c64-84f055769b4b
|
|
git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@356 2715db39-9adf-0310-9c64-84f055769b4b
|