[Python-modules-commits] [m2crypto] 03/20: New upstream version 0.27.0
Daniel Stender
stender at moszumanska.debian.org
Mon Nov 6 20:06:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
stender pushed a commit to branch debian/master
in repository m2crypto.
commit 65ce064030131a11b894ab314bc90cbb5b7b5dd4
Author: Daniel Stender <stender at debian.org>
Date: Sun Nov 5 21:33:12 2017 +0100
New upstream version 0.27.0
---
CHANGES | 177 +-
INSTALL.rst | 16 +-
M2Crypto.egg-info/PKG-INFO | 27 -
M2Crypto.egg-info/SOURCES.txt | 151 -
M2Crypto.egg-info/dependency_links.txt | 1 -
M2Crypto.egg-info/top_level.txt | 1 -
M2Crypto/ASN1.py | 130 +-
M2Crypto/AuthCookie.py | 88 +-
M2Crypto/BIO.py | 113 +-
M2Crypto/BN.py | 29 +-
M2Crypto/DH.py | 31 +-
M2Crypto/DSA.py | 253 +-
M2Crypto/EC.py | 346 +-
M2Crypto/EVP.py | 211 +-
M2Crypto/Engine.py | 41 +-
M2Crypto/Err.py | 42 +-
M2Crypto/PGP/PublicKey.py | 26 +-
M2Crypto/PGP/PublicKeyRing.py | 35 +-
M2Crypto/PGP/RSA.py | 10 +-
M2Crypto/PGP/__init__.py | 10 +-
M2Crypto/PGP/constants.py | 26 +-
M2Crypto/PGP/packet.py | 218 +-
M2Crypto/RC4.py | 5 +
M2Crypto/RSA.py | 287 +-
M2Crypto/Rand.py | 154 +-
M2Crypto/SMIME.py | 100 +-
M2Crypto/SSL/Checker.py | 108 +-
M2Crypto/SSL/Cipher.py | 28 +-
M2Crypto/SSL/Connection.py | 297 +-
M2Crypto/SSL/Context.py | 311 +-
M2Crypto/SSL/SSLServer.py | 29 +-
M2Crypto/SSL/Session.py | 23 +-
M2Crypto/SSL/TwistedProtocolWrapper.py | 233 +-
M2Crypto/SSL/__init__.py | 18 +-
M2Crypto/SSL/cb.py | 26 +-
M2Crypto/SSL/ssl_dispatcher.py | 7 +-
M2Crypto/SSL/timeout.py | 8 +-
M2Crypto/X509.py | 698 +-
M2Crypto/__init__.py | 10 +-
M2Crypto/ftpslib.py | 5 +-
M2Crypto/httpslib.py | 125 +-
M2Crypto/m2.py | 2 +-
M2Crypto/m2crypto.py | 86 +
M2Crypto/m2urllib.py | 82 +-
M2Crypto/m2urllib2.py | 62 +-
M2Crypto/m2xmlrpclib.py | 25 +-
M2Crypto/six.py | 868 +
M2Crypto/threading.py | 4 +
M2Crypto/util.py | 88 +-
MANIFEST.in | 12 -
PKG-INFO | 8 +-
README.rst | 65 +-
SWIG/_aes.i | 16 +-
SWIG/_asn1.i | 76 +-
SWIG/_bio.i | 310 +-
SWIG/_bn.i | 87 +-
SWIG/_dh.i | 120 +-
SWIG/_dsa.i | 205 +-
SWIG/_ec.i | 130 +-
SWIG/_engine.i | 1 +
SWIG/_evp.i | 189 +-
SWIG/_lib.h | 6 +-
SWIG/_lib.i | 294 +-
SWIG/_lib11_compat.i | 458 +
SWIG/_m2crypto.def | 2 +-
SWIG/_m2crypto.i | 29 +-
SWIG/_m2crypto_wrap.c | 31567 +++++++++++++++++++
SWIG/_objects.i | 10 +-
SWIG/_pkcs7.i | 56 +-
SWIG/_rand.i | 46 +-
SWIG/_rc4.i | 23 +-
SWIG/_rsa.i | 281 +-
SWIG/_ssl.i | 161 +-
SWIG/_threads.i | 19 +-
SWIG/_util.i | 15 +-
SWIG/_x509.i | 177 +-
SWIG/libcrypto-compat.h | 61 +
contrib/SimpleX509create.py | 4 +-
contrib/dispatcher.py | 371 +-
contrib/isaac.httpslib.py | 2 +-
contrib/m2crypto.spec | 46 -
contrib/smimeplus.py | 8 +-
doc/M2Crypto.PGP.rst | 51 +
doc/M2Crypto.SSL.rst | 91 +
doc/M2Crypto.rst | 219 +
doc/Makefile | 153 +
doc/ZServerSSL-HOWTO.html | 271 -
doc/ZServerSSL-HOWTO.rst | 239 +
doc/conf.py | 285 +
doc/doctrees/M2Crypto.PGP.doctree | Bin 0 -> 86275 bytes
doc/doctrees/M2Crypto.SSL.doctree | Bin 0 -> 349777 bytes
doc/doctrees/M2Crypto.doctree | Bin 0 -> 1257651 bytes
doc/doctrees/ZServerSSL-HOWTO.doctree | Bin 0 -> 49245 bytes
doc/doctrees/environment.pickle | Bin 0 -> 459094 bytes
doc/doctrees/howto.ca.doctree | Bin 0 -> 51373 bytes
doc/doctrees/howto.smime.doctree | Bin 0 -> 94672 bytes
doc/doctrees/howto.ssl.doctree | Bin 0 -> 22402 bytes
doc/doctrees/index.doctree | Bin 0 -> 7232 bytes
doc/howto.ca.html | 891 -
doc/howto.ca.rst | 370 +
doc/howto.smime.html | 1573 -
doc/howto.smime.rst | 778 +
doc/howto.ssl.html | 206 -
doc/howto.ssl.rst | 131 +
doc/html/.buildinfo | 4 +
doc/html/M2Crypto.PGP.html | 414 +
doc/html/M2Crypto.SSL.html | 1606 +
doc/html/M2Crypto.html | 4720 +++
doc/html/ZServerSSL-HOWTO.html | 359 +
doc/html/_modules/M2Crypto/ASN1.html | 347 +
doc/html/_modules/M2Crypto/AuthCookie.html | 263 +
doc/html/_modules/M2Crypto/BIO.html | 472 +
doc/html/_modules/M2Crypto/BN.html | 152 +
doc/html/_modules/M2Crypto/DH.html | 209 +
doc/html/_modules/M2Crypto/DSA.html | 550 +
doc/html/_modules/M2Crypto/EC.html | 553 +
doc/html/_modules/M2Crypto/EVP.html | 569 +
doc/html/_modules/M2Crypto/Engine.html | 239 +
doc/html/_modules/M2Crypto/Err.html | 162 +
doc/html/_modules/M2Crypto/PGP/PublicKey.html | 169 +
doc/html/_modules/M2Crypto/PGP/PublicKeyRing.html | 192 +
doc/html/_modules/M2Crypto/PGP/RSA.html | 122 +
doc/html/_modules/M2Crypto/PGP/packet.html | 514 +
doc/html/_modules/M2Crypto/RC4.html | 130 +
doc/html/_modules/M2Crypto/RSA.html | 557 +
doc/html/_modules/M2Crypto/Rand.html | 127 +
doc/html/_modules/M2Crypto/SMIME.html | 416 +
doc/html/_modules/M2Crypto/SSL.html | 134 +
doc/html/_modules/M2Crypto/SSL/Checker.html | 393 +
doc/html/_modules/M2Crypto/SSL/Cipher.html | 156 +
doc/html/_modules/M2Crypto/SSL/Connection.html | 719 +
doc/html/_modules/M2Crypto/SSL/Context.html | 542 +
doc/html/_modules/M2Crypto/SSL/SSLServer.html | 157 +
doc/html/_modules/M2Crypto/SSL/Session.html | 167 +
.../M2Crypto/SSL/TwistedProtocolWrapper.html | 518 +
doc/html/_modules/M2Crypto/SSL/cb.html | 192 +
doc/html/_modules/M2Crypto/SSL/ssl_dispatcher.html | 139 +
doc/html/_modules/M2Crypto/SSL/timeout.html | 130 +
doc/html/_modules/M2Crypto/X509.html | 1504 +
doc/html/_modules/M2Crypto/ftpslib.html | 185 +
doc/html/_modules/M2Crypto/httpslib.html | 355 +
doc/html/_modules/M2Crypto/m2crypto.html | 172 +
doc/html/_modules/M2Crypto/m2urllib.html | 207 +
doc/html/_modules/M2Crypto/m2urllib2.html | 274 +
doc/html/_modules/M2Crypto/m2xmlrpclib.html | 173 +
doc/html/_modules/M2Crypto/threading.html | 119 +
doc/html/_modules/M2Crypto/util.html | 223 +
doc/html/_modules/index.html | 129 +
doc/html/_sources/M2Crypto.PGP.txt | 51 +
doc/html/_sources/M2Crypto.SSL.txt | 91 +
doc/html/_sources/M2Crypto.txt | 219 +
doc/html/_sources/ZServerSSL-HOWTO.txt | 239 +
doc/html/_sources/howto.ca.txt | 370 +
doc/html/_sources/howto.smime.txt | 778 +
doc/html/_sources/howto.ssl.txt | 131 +
doc/html/_sources/index.txt | 30 +
doc/html/_static/ajax-loader.gif | Bin 0 -> 673 bytes
doc/html/_static/basic.css | 540 +
doc/html/_static/comment-bright.png | Bin 0 -> 3500 bytes
doc/html/_static/comment-close.png | Bin 0 -> 3578 bytes
doc/html/_static/comment.png | Bin 0 -> 3445 bytes
doc/html/_static/default.css | 256 +
doc/html/_static/doctools.js | 247 +
doc/html/_static/down-pressed.png | Bin 0 -> 368 bytes
doc/html/_static/down.png | Bin 0 -> 363 bytes
doc/html/_static/file.png | Bin 0 -> 392 bytes
doc/html/_static/jquery.js | 154 +
doc/html/_static/minus.png | Bin 0 -> 199 bytes
doc/html/_static/plus.png | Bin 0 -> 199 bytes
doc/html/_static/pygments.css | 65 +
doc/html/_static/searchtools.js | 560 +
doc/html/_static/sidebar.js | 151 +
doc/html/_static/underscore.js | 23 +
doc/html/_static/up-pressed.png | Bin 0 -> 372 bytes
doc/html/_static/up.png | Bin 0 -> 363 bytes
doc/html/_static/websupport.js | 808 +
doc/html/genindex.html | 3258 ++
doc/html/howto.ca.html | 469 +
doc/html/howto.smime.html | 847 +
doc/html/howto.ssl.html | 220 +
doc/html/index.html | 194 +
doc/html/objects.inv | Bin 0 -> 5904 bytes
doc/html/py-modindex.html | 326 +
doc/html/search.html | 105 +
doc/html/searchindex.js | 1 +
doc/index.rst | 30 +
doc/make.bat | 190 +
setup.cfg | 6 +-
setup.py | 253 +-
tests/.ropeproject/config.py | 95 -
tests/__init__.py | 2 +-
tests/alltests.py | 15 +-
tests/bad_date_cert.crt | 19 +
tests/easy_rsa.pem | 74 +
tests/ec.priv.pem | 7 +-
tests/ec.pub.pem | 5 +-
tests/fips.py | 7 +-
tests/makecerts.py | 43 +-
tests/randpool.dat | Bin 1024 -> 1024 bytes
tests/sig.p7 | 8 +-
tests/sig.p7s | 18 +-
tests/test_asn1.py | 69 +-
tests/test_authcookie.py | 73 +-
tests/test_bio.py | 14 +-
tests/test_bio_file.py | 97 +-
tests/test_bio_iobuf.py | 11 +-
tests/test_bio_membuf.py | 52 +-
tests/test_bio_ssl.py | 8 +-
tests/test_bn.py | 0
tests/test_dh.py | 7 +-
tests/test_dsa.py | 4 +-
tests/test_ec_curves.py | 206 +-
tests/test_ecdh.py | 15 +-
tests/test_ecdsa.py | 26 +-
tests/test_engine.py | 2 +-
tests/test_evp.py | 234 +-
tests/test_obj.py | 56 +-
tests/test_pgp.py | 13 +-
tests/test_rand.py | 25 +-
tests/test_rc4.py | 17 +-
tests/test_rsa.py | 92 +-
tests/test_smime.py | 176 +-
tests/test_ssl.py | 325 +-
tests/test_ssl_offline.py | 14 +-
tests/test_ssl_win.py | 2 +-
tests/test_util.py | 60 +
tests/test_x509.py | 341 +-
227 files changed, 71718 insertions(+), 6344 deletions(-)
diff --git a/CHANGES b/CHANGES
index 8355a94..f892776 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,112 @@
+0.27.0 - 2017-10-05
+-------------------
+- Fix licence: it is MIT, not BSD
+- At least minimal support of SNI in httpslib.
+- Small bugfixes and cleanups.
+- More effort to make build system more robust (now should work even on
+ Debian LTS).
+- Restore m2.rsa_set_e() and m2.rsa_set_n().
+- Make sure that every exceptional return throws and exception and vice
+ versa.
+
+0.26.4 - 2017-09-26
+-------------------
+- Proper fix of deprecation warning for OpenSSL 1.1.0
+- Small mostly stylistic bugfixes
+- Emergency release to fix FTBFS.
+
+0.26.3 - 2017-09-22
+-------------------
+- Fix a syntax typo.
+
+0.26.2 - 2017-09-20
+-------------------
+- port to support OpenSSL 1.1.0 API
+- add generated Sphinx documentation
+- another set of cleanups
+
+0.26.0 - 2017-03-21
+-------------------
+- Fix packaging on RHEL-6
+- Replace ASN1_UTCTIME with ASN1_TIME which supports both UTCTime and
+ GeneralizedTime
+- Add possibility to sign PKCS7 with a non-default digest.
+- Add possibility to set custom callback for X509 verification.
+- Clean up imports and PEP8ization
+- A lot of cleanups on the way towards Python 3
+- Other small bugfixes
+
+0.25.1 - 2016-07-25
+-------------------
+- Actually do check, whether we have SSLv2 compiled in, and don't run
+ test for it.
+
+0.25.0 - 2016-03-21
+-------------------
+- More cleanups, removal of obsolete stuff, and moves towards py3k
+ compatibility.
+- Add support for EC.get_builtin_curves() and use it for testing.
+- Enable AES CTR mode
+- Bundle-in six module v. 1.10.0
+- add rand_file_name and rand_status
+- remove all LHASH fiddling
+- Extend Travis and GitLab CI configuration to test also py3k (with
+ allowed_failures) and CentOS6 (on GitLab CI).
+- Add CONTRIBUTORS.rst. Thank you!
+- Add PEP-484 type hints in comments to all Python files (except for
+ tests)
+- Use context managers for file handling wherever possible instead of
+ leaking open file descriptors.
+- Improve defaults handling for SSL_CTX_new().
+- Fix PGP tests to actually run
+
+0.24.0 - 2016-03-21
+-------------------
+- More cleanups, removal of obsolete stuff, and moves towards py3k
+ compatibility.
+- Add DSA.pub_key_from_params() factory function (and m2.dsa_set_pub()).
+- Allow import/export of EC public key with binary values
+- Add EVP.load_key_string_pubkey() function, as well as helper functions
+- Add EVP.get_digestbyname() functionality.
+- Convert documentation to rST (and add instructions for building on Mac
+ OS X)
+- Another round of fixing multiarch building.
+- Disable tests with weak ciphers on some platforms (Debain)
+
+0.23.0 - 2016-01-29
+-------------------
+- Add Travis and GitLab CI configurations
+- Allow building without SSLv2
+- More cleanups and removing obsolete code
+- Fix README
+- Fix buffer overflow in pkcs5_pbkdf2_hmac_sha1
+- First moves towards Python 3 compatibility
+- Removed rather large and completely unmaintained demo/ subdirectory
+ (now in a separate repo https://gitlab.com/m2crypto/m2crypto_demo)
+- Automatically generated test data files
+- Finally fix building on multiarch systems
+- All objects derived from BIO.BIO now could work as context managers
+- Switch setup.py to setuptools
+
+0.22.5 - 2015-10-13
+-------------------
+- Add forgoteen SWIG/*.h among distributed files.
+
+0.22.4 - 2015-10-13
+-------------------
+- Matěj Cepl takes over leadership of the upstream maintenance
+- Fedora/RHEL distribution patches merged to the main development
+ (mainly, but not only, upgrading to the more recent versions of
+ OpenSSL, swig which is now at 3.0.5, but anything above 2.0.4 is
+ supported as well, and python which now has to be at least 2.6).
+- Tons of cleaning up the code for obsolete constructs, PEP8ization,
+ etc.
+
+0.22.3 - 2014-01-22
+-------------------
+(released by Martin Paljak, later development started on top of 0.21.1
+with his improvements cherry picked to the new development branch)
+
0.21.1 - 2011-01-15
-------------------
- Distribution fix
@@ -43,7 +152,7 @@
was held by another thread, by Miloslav Trmac
- Allow more blocking OpenSSL functions to run without GIL, by Miloslav Trmac
- Fixed httpslib to send only the path+query+fragment part of the URL when
- using CONNECT proxy, by James Bowes
+ using CONNECT proxy, by James Bowes
- SSLServer.__init__ now takes optional bind_and_activate parameter and
initializes by calling SocketServer.BaseServer.__init__, which
are Python 2.6 compatibility fixes, by Christian
@@ -54,7 +163,7 @@
- Added support for disabling padding when using RSA encryption,
by Chris Collis
- ASN1_INTEGERs can now be larger than fits in an int, for example to support
- X509 certificates with large serial numbers,
+ X509 certificates with large serial numbers,
patch by Mikhail Vorozhtsov and testcase by Barry G.
- Reverted a change done in 0.17 to m2urllib2 which changed urls to include
host when it should stay as it was
@@ -180,7 +289,7 @@
are both None
- Fixed X509.check_purpose() (was always raising exceptions)
- smime_read_pkcs7 was changed to automatically call BIO_set_mem_eof_return
- on memory BIOs because otherwise the read would fail with
+ on memory BIOs because otherwise the read would fail with
"SMIME_Error: not enough data"
- X509.new_extension('subjectKeyIdentifier', 'hash') raises ValueError instead
of crashing Python
@@ -262,7 +371,7 @@
M2Crypto.Rand.
- Updated ZServerSSL files to match Zope 2.7.0 versions.
- Integrated (overlapping) patches by Peter Teniz and Heikki Toivonen
- covering operations on X.509-related structures that gives M2Crypto
+ covering operations on X.509-related structures that gives M2Crypto
PKI functionality. Thanks Peter and Heikki.
- Peter Teniz contributed demo2004/pki/x509auth.py.
- Created demo2004/ directory that will contain new or updated demos.
@@ -274,15 +383,15 @@
-------------------------
- Patches from Artur Frysiak <wiget at pld-linux.org>. Thanks Artur.
= Allow using a passphrase callback in class SMIME.
- = Added method get0_signers to class PKCS7, which retrieves signers'
+ = Added method get0_signers to class PKCS7, which retrieves signers'
certificates from a PKCS7 blob.
= Added methods as_pem and save_pem to class X509.
= Added file version.py.
- = Allow SSL.Context.load_verify_locations to accept both 'cafile' and
+ = Allow SSL.Context.load_verify_locations to accept both 'cafile' and
'capath'.
-- Fixed BIO.read() not reading until EOF. Thanks to Egil Muller
+- Fixed BIO.read() not reading until EOF. Thanks to Egil Muller
<redhog at redhog.org> for suggestion.
-- Honour 'mode' parameter in SSL.Connection.makefile. Thanks again to Egil
+- Honour 'mode' parameter in SSL.Connection.makefile. Thanks again to Egil
Muller.
- Roger Binns contributed epydoc-generated docs for M2Crypto. Thanks Roger.
- Peter Teniz contributed patches to create X.509 requests and certificates.
@@ -295,24 +404,24 @@
--------------------
- ZServerSSL with client certificate-based authentication rides again.
- Created Makefile for Python 2.3.
-- Modified LICENCE: changed my name to the generic "the author" in the
+- Modified LICENCE: changed my name to the generic "the author" in the
all-caps disclaimer paragraph.
- Allow to save RSA key pair in the clear.
- ZServerSSL for Zope 2.7.
-- Excluded RC5. IDEA was taken out several releases ago. This should
+- Excluded RC5. IDEA was taken out several releases ago. This should
allow M2Crypto to build with stock OpenSSL on various Linuxen.
- Added ssl_set_tmp_dh_callback.
- Added ssl_set_tmp_rsa and ssl_set_tmp_rsa_callback to support weak-cipher
browsers.
-- ZServerSSL exports SSL_CIPHER request header (a la mod_ssl) to Zope
+- ZServerSSL exports SSL_CIPHER request header (a la mod_ssl) to Zope
applications.
- Perform distutils's SWIG .i search path tweaking within setup.py. setup.py
should now work "out of the box".
-- Added contrib/smimeplus.py, a high-level S/MIME interface, contributed by
+- Added contrib/smimeplus.py, a high-level S/MIME interface, contributed by
Bernard Yue <bernie at 3captus.com>. Thanks Bernard.
-- Added in long forms of nid's in X509_Name. Thanks to William K Volkman
+- Added in long forms of nid's in X509_Name. Thanks to William K Volkman
<development at netshark.com> for patch.
-- Updated Mac OS X build instructions. Thanks to Larry Bugbee
+- Updated Mac OS X build instructions. Thanks to Larry Bugbee
Changes since 0.10
@@ -335,19 +444,19 @@
Changes since 0.09
--------------------
- Updated to OpenSSL 0.9.7. Thanks to Toby Allsopp <toby at MI6.GEN.NZ> for
- patches.
-- Added functionality to create a basic certificate request. Also
- contributed by Toby Allsopp.
+ patches.
+- Added functionality to create a basic certificate request. Also
+ contributed by Toby Allsopp.
- Finally, AES!
Changes since 0.08
--------------------
-- Replaced demo/Zope/ZServer/__init__.py with the correct version
+- Replaced demo/Zope/ZServer/__init__.py with the correct version
for Zope 2.6.0.
- Added a sample starts.bat for ZServerSSL.
- Incoporated a patch by prashanth at jibe.biz that handled the
- new-in-Python-2.2.2 "strict" parameter for the various HTTP[S] connection
+ new-in-Python-2.2.2 "strict" parameter for the various HTTP[S] connection
classes in httplib.py. Thanks prashanth. This fixes M2Crypto's XMLRPC
support for Python 2.2.2. (Apparently it was working for Python 2.2.1.)
- Incorporated some cosmetic patches from Adam Karpierz <karpierz at zope.pl>.
@@ -365,7 +474,7 @@
- Included in contrib/ Isaac Salzberg's application of Mihai Ibanescu's
patch that allows IIS interoperability thru an authenticating proxy.
Thanks Isaac.
-- Included in contrib/ patch by Dave Brueck <dave at pythonaprocrypha.com>
+- Included in contrib/ patch by Dave Brueck <dave at pythonaprocrypha.com>
that has smarter non-blocking behaviour. Thanks Dave.
@@ -387,7 +496,7 @@
Changes since 0.05
-----------------------
- Handled the cases where Python callbacks raised exceptions.
-- Fixed a NULL-deref bug in _ssl.i which crashes Medusa https when IE
+- Fixed a NULL-deref bug in _ssl.i which crashes Medusa https when IE
or Opera comes a-calling.
- ZServerSSL rides again - a more robust ZServerSSL for Zope 2.3.0.
- Added the MIME type 'application/x-x509-ca-cert' to
@@ -411,17 +520,17 @@
- Fixed yet more memory leaks. Thanks to Ray Suorsa <res at loudcloud.com>.
- Build instructions for Borland BC++ 5.5 free compiler suite.
- Bundles the June 2000 unencumbered release of Medusa.
-- SSL callback thread-safety. Thanks again to Ray Suorsa for insights and
+- SSL callback thread-safety. Thanks again to Ray Suorsa for insights and
patches.
-- Renamed M2Crypto.M2Crypto to M2Crypto.m2 to prevent package/module loading
+- Renamed M2Crypto.M2Crypto to M2Crypto.m2 to prevent package/module loading
confusion.
- SSL.Session and a demo in demo/ssl/sess.py.
- https_srv.py, an enhanced, https version of SimpleHTTPServer.py.
-- Interface change: SMIME.load_pkcs7_bio() is renamed
- SMIME.smime_load_pkcs7_bio(), similarly SMIME.load_pkcs7() to
+- Interface change: SMIME.load_pkcs7_bio() is renamed
+ SMIME.smime_load_pkcs7_bio(), similarly SMIME.load_pkcs7() to
SMIME.smime_load_pkcs7(); these load PKCS7 objects generated by S/MIME.
-- Interface change: SMIME.load_pkcs7_bio() now loads a PKCS7 PEM file, i.e., a
- file of the format "-----BEGIN PKCS7-----".
+- Interface change: SMIME.load_pkcs7_bio() now loads a PKCS7 PEM file, i.e., a
+ file of the format "-----BEGIN PKCS7-----".
- Works with both Python 2.0 and Python 1.5.2.
- OpenSSL 0.9.6. (Possibly incompatible with earlier OpenSSL releases.)
- Unit tests with PyUnit.
@@ -430,7 +539,7 @@
= Diligent error checking.
= Fixed memory leaks.
- Renamed M2Crypto.urllib2 to M2Crypto.m2urllib.
-- HTTPS clients of Python 1.5.2's and Python 2.0's httplib and urllib.
+- HTTPS clients of Python 1.5.2's and Python 2.0's httplib and urllib.
Changes since 0.03
@@ -444,7 +553,7 @@
- Unified SSL read() and write() for synchronous and asynchronous operation.
- S/MIME and PKCS #7.
- Integrated with OpenSSL 0.9.5.
-- Enhanced the PRNG interface.
+- Enhanced the PRNG interface.
Changes since 0.02
@@ -457,7 +566,7 @@
6. Beginnings of PGP2 support.
7. Replaced eval() calls with other (hopefully) safe ones.
8. Miscellaneous enhancements and bug fixes.
-
+
Changes since 0.01
-----------------------
@@ -467,12 +576,12 @@
- An SSLServer modeled after SocketServer.
- A ForkingSSLServer that seems to work well.
- A ThreadingSSLServer that runs one thread at a time. (!) ;-)
-
+
For building servers, nonblocking i/o:
- An ssl_dispatcher modeled after asyncore.dispatcher.
A HTTPS server based on Medusa.
-
+
For client-side web programming:
- httpslib
- urllib2
@@ -482,7 +591,7 @@
3. Reduced per-module name space pollution.
4. Have Swig check for NULL pointers: reduced .i cut-&-paste.
5. Standardise on MPINT for passing big integers between Python and OpenSSL.
-6. Removed MD5, SHA1, RIPEMD160. Just use EVP.MessageDigest.
-7. Removed HMAC. Just use EVP.HMAC.
+6. Removed MD5, SHA1, RIPEMD160. Just use EVP.MessageDigest.
+7. Removed HMAC. Just use EVP.HMAC.
diff --git a/INSTALL.rst b/INSTALL.rst
index 366cc6d..5edf3a1 100644
--- a/INSTALL.rst
+++ b/INSTALL.rst
@@ -10,10 +10,22 @@ The following software packages are pre-requisites:
- Python 2.6 or newer
- OpenSSL 1.0.1e or newer
-- SWIG 1.3.40 or newer
- Python 2.6 platforms require the Python package unittest2 to be
installed
+For further development you need (aside from the normal development
+environment, C compiler, header files for OpenSSL, etc.) also:
+
+- SWIG 2.0.4 or newer
+
+Debian
+~~~~~~
+
+For Py2 & Py3 support install::
+
+ sudo apt-get install build-essential python3-dev python-dev libssl-dev swig
+
+
Installing on Unix-like systems, including Cygwin
-------------------------------------------------
@@ -129,7 +141,7 @@ him a working copy of M2Crypto on his system::
$ brew install openssl && brew install swig
$ brew --prefix openssl
/usr/local/opt/openssl
- $ LDFLAGS="-L$(brew --prefix openssl)/lib"
+ $ LDFLAGS="-L$(brew --prefix openssl)/lib" \
CFLAGS="-I$(brew --prefix openssl)/include" \
SWIG_FEATURES="-I$(brew --prefix openssl)/include" \
pip install m2crypto
diff --git a/M2Crypto.egg-info/PKG-INFO b/M2Crypto.egg-info/PKG-INFO
deleted file mode 100644
index d0b73bf..0000000
--- a/M2Crypto.egg-info/PKG-INFO
+++ /dev/null
@@ -1,27 +0,0 @@
-Metadata-Version: 1.1
-Name: M2Crypto
-Version: 0.24.0
-Summary: M2Crypto: A Python crypto and SSL toolkit
-Home-page: https://gitlab.com/m2crypto/m2crypto
-Author: Matej Cepl
-Author-email: mcepl at cepl.eu
-License: BSD-style license
-Description: M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA,
- DH, EC, HMACs, message digests, symmetric ciphers (including AES); SSL
- functionality to implement clients and servers; HTTPS extensions to Python's
- httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCookies for web
- session management; FTP/TLS client and server; S/MIME; ZServerSSL: A HTTPS
- server for Zope and ZSmime: An S/MIME messenger for Zope. M2Crypto can also be
- used to provide SSL for Twisted.
-Keywords: cryptography openssl
-Platform: any
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: C
-Classifier: Programming Language :: Python
-Classifier: Topic :: Security :: Cryptography
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
diff --git a/M2Crypto.egg-info/SOURCES.txt b/M2Crypto.egg-info/SOURCES.txt
deleted file mode 100644
index 091bd5a..0000000
--- a/M2Crypto.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,151 +0,0 @@
-CHANGES
-INSTALL.rst
-LICENCE
-MANIFEST.in
-README.rst
-epydoc.conf
-setup.cfg
-setup.py
-M2Crypto/ASN1.py
-M2Crypto/AuthCookie.py
-M2Crypto/BIO.py
-M2Crypto/BN.py
-M2Crypto/DH.py
-M2Crypto/DSA.py
-M2Crypto/EC.py
-M2Crypto/EVP.py
-M2Crypto/Engine.py
-M2Crypto/Err.py
-M2Crypto/RC4.py
-M2Crypto/RSA.py
-M2Crypto/Rand.py
-M2Crypto/SMIME.py
-M2Crypto/X509.py
-M2Crypto/__init__.py
-M2Crypto/callback.py
-M2Crypto/ftpslib.py
-M2Crypto/httpslib.py
-M2Crypto/m2.py
-M2Crypto/m2urllib.py
-M2Crypto/m2urllib2.py
-M2Crypto/m2xmlrpclib.py
-M2Crypto/threading.py
-M2Crypto/util.py
-M2Crypto.egg-info/PKG-INFO
-M2Crypto.egg-info/SOURCES.txt
-M2Crypto.egg-info/dependency_links.txt
-M2Crypto.egg-info/top_level.txt
-M2Crypto/PGP/PublicKey.py
-M2Crypto/PGP/PublicKeyRing.py
-M2Crypto/PGP/RSA.py
-M2Crypto/PGP/__init__.py
-M2Crypto/PGP/constants.py
-M2Crypto/PGP/packet.py
-M2Crypto/SSL/Checker.py
-M2Crypto/SSL/Cipher.py
-M2Crypto/SSL/Connection.py
-M2Crypto/SSL/Context.py
-M2Crypto/SSL/SSLServer.py
-M2Crypto/SSL/Session.py
-M2Crypto/SSL/TwistedProtocolWrapper.py
-M2Crypto/SSL/__init__.py
-M2Crypto/SSL/cb.py
-M2Crypto/SSL/ssl_dispatcher.py
-M2Crypto/SSL/timeout.py
-SWIG/_aes.i
-SWIG/_asn1.i
-SWIG/_bio.i
-SWIG/_bn.i
-SWIG/_dh.i
-SWIG/_dsa.i
-SWIG/_ec.i
-SWIG/_engine.i
-SWIG/_evp.i
-SWIG/_lib.h
-SWIG/_lib.i
-SWIG/_m2crypto.def
-SWIG/_m2crypto.i
-SWIG/_objects.i
-SWIG/_pkcs7.i
-SWIG/_rand.i
-SWIG/_rc4.i
-SWIG/_rsa.i
-SWIG/_ssl.i
-SWIG/_threads.i
-SWIG/_util.i
-SWIG/_x509.i
-contrib/README
-contrib/SimpleX509create.README
-contrib/SimpleX509create.py
-contrib/dave.README
-contrib/dave.patch
-contrib/dispatcher.README
-contrib/dispatcher.py
-contrib/isaac.README
-contrib/isaac.httpslib.py
-contrib/m2crypto.spec
-contrib/smimeplus.README
-contrib/smimeplus.py
-doc/ZServerSSL-HOWTO.html
-doc/howto.ca.html
-doc/howto.smime.html
-doc/howto.ssl.html
-tests/README
-tests/__init__.py
-tests/alltests.py
-tests/ca.pem
-tests/ca_key.pem
-tests/der_encoded_seq.b64
-tests/dhparams.pem
-tests/dsa.param.pem
-tests/dsa.priv.pem
-tests/dsa.pub.pem
-tests/ec.priv.pem
-tests/ec.pub.pem
-tests/fips.py
-tests/long_serial_cert.pem
-tests/makecerts.py
-tests/pubring.pgp
-tests/randpool.dat
-tests/recipient.pem
-tests/recipient_key.pem
-tests/rsa.priv.pem
-tests/rsa.priv2.pem
-tests/rsa.pub.pem
-tests/server.pem
-tests/server_key.pem
-tests/sig.p7
-tests/sig.p7s
-tests/signer.pem
-tests/signer_key.pem
-tests/test_asn1.py
-tests/test_authcookie.py
-tests/test_bio.py
-tests/test_bio_file.py
-tests/test_bio_iobuf.py
-tests/test_bio_membuf.py
-tests/test_bio_ssl.py
-tests/test_bn.py
-tests/test_dh.py
-tests/test_dsa.py
-tests/test_ec_curves.py
-tests/test_ecdh.py
-tests/test_ecdsa.py
-tests/test_engine.py
-tests/test_evp.py
-tests/test_obj.py
-tests/test_pgp.py
-tests/test_rand.py
-tests/test_rc4.py
-tests/test_rsa.py
-tests/test_smime.py
-tests/test_ssl.py
-tests/test_ssl_offline.py
-tests/test_ssl_win.py
-tests/test_threading.py
-tests/test_x509.py
-tests/thawte.pem
-tests/x509.der
-tests/x509.pem
-tests/x509_key.pem
-tests/.ropeproject/config.py
\ No newline at end of file
diff --git a/M2Crypto.egg-info/dependency_links.txt b/M2Crypto.egg-info/dependency_links.txt
deleted file mode 100644
index 8b13789..0000000
--- a/M2Crypto.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/M2Crypto.egg-info/top_level.txt b/M2Crypto.egg-info/top_level.txt
deleted file mode 100644
index fa4a704..0000000
--- a/M2Crypto.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-M2Crypto
diff --git a/M2Crypto/ASN1.py b/M2Crypto/ASN1.py
index a8bb754..018ec20 100644
--- a/M2Crypto/ASN1.py
+++ b/M2Crypto/ASN1.py
@@ -9,45 +9,66 @@ Portions created by Open Source Applications Foundation (OSAF) are
Copyright (C) 2005 OSAF. All Rights Reserved.
"""
-import time, datetime
+import datetime
+import time
-from M2Crypto import BIO, m2
+from M2Crypto import BIO, m2, util
+if util.py27plus:
+ from typing import Any, Callable, Optional, Tuple # noqa
MBSTRING_FLAG = 0x1000
MBSTRING_ASC = MBSTRING_FLAG | 1
MBSTRING_BMP = MBSTRING_FLAG | 2
-class ASN1_Integer:
+class ASN1_Integer: # noqa
m2_asn1_integer_free = m2.asn1_integer_free
def __init__(self, asn1int, _pyfree=0):
+ # type: (ASN1_Integer, int) -> None
self.asn1int = asn1int
self._pyfree = _pyfree
def __cmp__(self, other):
+ # type: (ASN1_Integer) -> int
+ if isinstance(other, ASN1_Integer):
+ raise TypeError(
+ "Comparisons supported only between ANS1_Integer objects")
+
return m2.asn1_integer_cmp(self.asn1int, other.asn1int)
def __del__(self):
+ # type: () -> None
if self._pyfree:
self.m2_asn1_integer_free(self.asn1int)
+ def __int__(self):
+ # type: () -> int
+ return m2.asn1_integer_get(self.asn1int)
+
-class ASN1_String:
+class ASN1_String: # noqa
m2_asn1_string_free = m2.asn1_string_free
def __init__(self, asn1str, _pyfree=0):
+ # type: (ASN1_String, int) -> None
self.asn1str = asn1str
self._pyfree = _pyfree
- def __str__(self):
+ def __bytes__(self):
+ # type: () -> bytes
buf = BIO.MemoryBuffer()
m2.asn1_string_print(buf.bio_ptr(), self.asn1str)
return buf.read_all()
+ def __str__(self):
+ # type: () -> str
+ return util.py3str(self.__bytes__())
+
def __del__(self):
+ # type: () -> None
if getattr(self, '_pyfree', 0):
self.m2_asn1_string_free(self.asn1str)
@@ -55,44 +76,59 @@ class ASN1_String:
return self.asn1str
def as_text(self, flags=0):
+ # type: (int) -> str
+ """output an ASN1_STRING structure according to the set flags.
+
+ :param flags: determine the format of the output by using
+ predetermined constants, see ASN1_STRING_print_ex(3)
+ manpage for their meaning.
+ :return: output an ASN1_STRING structure.
+ """
buf = BIO.MemoryBuffer()
m2.asn1_string_print_ex(buf.bio_ptr(), self.asn1str, flags)
- return buf.read_all()
+ return util.py3str(buf.read_all())
-class ASN1_Object:
+class ASN1_Object: # noqa
m2_asn1_object_free = m2.asn1_object_free
def __init__(self, asn1obj, _pyfree=0):
+ # type: (ASN1_Object, int) -> None
self.asn1obj = asn1obj
self._pyfree = _pyfree
def __del__(self):
+ # type: () -> None
if self._pyfree:
self.m2_asn1_object_free(self.asn1obj)
def _ptr(self):
return self.asn1obj
+
class _UTC(datetime.tzinfo):
def tzname(self, dt):
+ # type: (Optional[datetime.datetime]) -> str
return "UTC"
def dst(self, dt):
+ # type: (Optional[datetime.datetime]) -> datetime.timedelta
return datetime.timedelta(0)
def utcoffset(self, dt):
+ # type: (Optional[datetime.datetime]) -> datetime.timedelta
return datetime.timedelta(0)
def __repr__(self):
return "<Timezone: %s>" % self.tzname(None)
-UTC = _UTC()
+UTC = _UTC() # type: _UTC
class LocalTimezone(datetime.tzinfo):
""" Localtimezone from datetime manual """
def __init__(self):
+ # type: () -> None
self._stdoffset = datetime.timedelta(seconds=-time.timezone)
if time.daylight:
self._dstoffset = datetime.timedelta(seconds=-time.altzone)
@@ -100,23 +136,26 @@ class LocalTimezone(datetime.tzinfo):
self._dstoffset = self._stdoffset
self._dstdiff = self._dstoffset - self._stdoffset
-
def utcoffset(self, dt):
+ # type: (datetime.datetime) -> datetime.timedelta
if self._isdst(dt):
return self._dstoffset
else:
return self._stdoffset
def dst(self, dt):
+ # type: (datetime.datetime) -> datetime.timedelta
if self._isdst(dt):
return self._dstdiff
else:
return datetime.timedelta(0)
def tzname(self, dt):
- return time.tzname[self._isdst(dt)]
+ # type: (datetime.datetime) -> str
+ return time.tzname[self._isdst(dt).real]
def _isdst(self, dt):
+ # type: (datetime.datetime) -> bool
tt = (dt.year, dt.month, dt.day,
dt.hour, dt.minute, dt.second,
dt.weekday(), 0, -1)
@@ -125,49 +164,63 @@ class LocalTimezone(datetime.tzinfo):
return tt.tm_isdst > 0
-class ASN1_UTCTIME:
+class ASN1_TIME: # noqa
_ssl_months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"]
- m2_asn1_utctime_free = m2.asn1_utctime_free
-
- def __init__(self, asn1_utctime=None, _pyfree=0):
- if asn1_utctime is not None:
- assert m2.asn1_utctime_type_check(asn1_utctime), "'asn1_utctime' type error'"
- self.asn1_utctime = asn1_utctime
+ m2_asn1_time_free = m2.asn1_time_free
+
+ def __init__(self, asn1_time=None, _pyfree=0, asn1_utctime=None):
+ # type: (Optional[ASN1_TIME], int) -> None
+ # handle old keyword parameter
+ if asn1_time is None:
+ asn1_time = asn1_utctime
+ if asn1_time is not None:
+ assert m2.asn1_time_type_check(asn1_time), \
+ "'asn1_time' type error'"
+ self.asn1_time = asn1_time
self._pyfree = _pyfree
else:
- self.asn1_utctime = m2.asn1_utctime_new()
+ self.asn1_time = m2.asn1_time_new()
self._pyfree = 1
def __del__(self):
... 87358 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/m2crypto.git
More information about the Python-modules-commits
mailing list