diff options
author | Hynek Schlawack <hs@ox.cx> | 2016-03-16 13:31:29 +0100 |
---|---|---|
committer | Hynek Schlawack <hs@ox.cx> | 2016-03-16 13:31:29 +0100 |
commit | b98d56999b10296fc5ba8b783ca427450cf5e0b4 (patch) | |
tree | d3714aa705b243cd973dba4799076641cb3f9dbf | |
parent | b6e39c8a92245c76fe093d03494e7763f01dba52 (diff) | |
parent | 95d67cece52a2fe614136696c66c74249046f7df (diff) | |
download | pyopenssl-b98d56999b10296fc5ba8b783ca427450cf5e0b4.tar.gz |
Merge pull request #449 from pyca/alex-patch-1
Remove code for pre-cryptography 1.2
-rw-r--r-- | .travis.yml | 12 | ||||
-rw-r--r-- | src/OpenSSL/crypto.py | 7 | ||||
-rw-r--r-- | tox.ini | 4 |
3 files changed, 9 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml index 3f0c813..c1f11aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,17 +47,17 @@ matrix: # And older cryptography versions. - python: "2.6" - env: TOXENV=py26-cryptography1.1 + env: TOXENV=py26-cryptography1.2 - python: "2.7" - env: TOXENV=py27-cryptography1.1 + env: TOXENV=py27-cryptography1.2 - python: "3.3" - env: TOXENV=py33-cryptography1.1 + env: TOXENV=py33-cryptography1.2 - python: "3.4" - env: TOXENV=py34-cryptography1.1 + env: TOXENV=py34-cryptography1.2 - python: "3.5" - env: TOXENV=py35-cryptography1.1 + env: TOXENV=py35-cryptography1.2 - python: "pypy" - env: TOXENV=pypy-cryptography1.1 + env: TOXENV=pypy-cryptography1.2 # Make sure we don't break Twisted or urllib3 diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index ce32f93..a5924c9 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -270,12 +270,7 @@ class PKey(object): :return: The type of the key. """ - try: - # cryptography 1.2+ - return _lib.Cryptography_EVP_PKEY_id(self._pkey) - except AttributeError: - # Older releases of cryptography. - return self._pkey.type + return _lib.Cryptography_EVP_PKEY_id(self._pkey) def bits(self): """ @@ -1,5 +1,5 @@ [tox] -envlist = coverage-clean,{pypy,py26,py27,py33,py34,py35}{,-cryptographyMaster,-cryptography1.1},py27-twistedMaster,pypi-readme,check-manifest,flake8,docs,coverage-report +envlist = coverage-clean,{pypy,py26,py27,py33,py34,py35}{,-cryptographyMaster,-cryptography1.2},py27-twistedMaster,pypi-readme,check-manifest,flake8,docs,coverage-report [testenv] whitelist_externals = @@ -9,7 +9,7 @@ deps = coverage pytest>=2.8.5 cryptographyMaster: git+https://github.com/pyca/cryptography.git - cryptography1.1: cryptography<1.2 + cryptography1.2: cryptography<1.3 setenv = # Do not allow the executing environment to pollute the test environment # with extra packages. |