Merge pull request #449 from pyca/alex-patch-1

Remove code for pre-cryptography 1.2
diff --git a/.travis.yml b/.travis.yml
index 3f0c813..c1f11aa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -47,17 +47,17 @@
 
   # 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 @@
 
         :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):
         """
diff --git a/tox.ini b/tox.ini
index a1b7138..374d568 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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 @@
     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.