Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 python-cryptography (0.9-1) unstable; urgency=low
 .
   * New upstream release.
Author: Tristan Seligmann <mithrandi@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

Index: python-cryptography-0.9/setup.py
===================================================================
--- python-cryptography-0.9.orig/setup.py	2015-06-08 14:51:24.170383246 +0200
+++ python-cryptography-0.9/setup.py	2015-06-08 14:51:43.810674816 +0200
@@ -42,7 +42,7 @@
     requirements.append("enum34")
 
 if sys.version_info < (3, 3):
-    requirements.append("ipaddress")
+    requirements.append("ipaddr")
 
 if platform.python_implementation() != "PyPy":
     requirements.append("cffi>=0.8")
Index: python-cryptography-0.9/src/cryptography/hazmat/backends/openssl/x509.py
===================================================================
--- python-cryptography-0.9.orig/src/cryptography/hazmat/backends/openssl/x509.py	2015-06-08 14:51:24.170383246 +0200
+++ python-cryptography-0.9/src/cryptography/hazmat/backends/openssl/x509.py	2015-06-08 14:56:37.671042066 +0200
@@ -14,7 +14,10 @@
 from __future__ import absolute_import, division, print_function
 
 import datetime
-import ipaddress
+try:
+    from ipaddress import ip_address
+except ImportError:
+    from ipaddr import IPAddress as ip_address
 from email.utils import parseaddr
 
 import idna
@@ -121,7 +124,7 @@
         return x509.RegisteredID(x509.ObjectIdentifier(oid))
     elif gn.type == backend._lib.GEN_IPADD:
         return x509.IPAddress(
-            ipaddress.ip_address(
+            ip_address(
                 backend._ffi.buffer(
                     gn.d.iPAddress.data, gn.d.iPAddress.length
                 )[:]
Index: python-cryptography-0.9/src/cryptography/x509.py
===================================================================
--- python-cryptography-0.9.orig/src/cryptography/x509.py	2015-06-08 14:51:24.170383246 +0200
+++ python-cryptography-0.9/src/cryptography/x509.py	2015-06-08 14:51:24.166383186 +0200
@@ -5,7 +5,10 @@
 from __future__ import absolute_import, division, print_function
 
 import abc
-import ipaddress
+try:
+    import ipaddress
+except ImportError:
+    import ipaddr as ipaddress
 from enum import Enum
 
 import six
Index: python-cryptography-0.9/tests/test_x509_ext.py
===================================================================
--- python-cryptography-0.9.orig/tests/test_x509_ext.py	2015-06-08 14:51:24.170383246 +0200
+++ python-cryptography-0.9/tests/test_x509_ext.py	2015-06-08 14:55:28.522013614 +0200
@@ -5,7 +5,10 @@
 from __future__ import absolute_import, division, print_function
 
 import binascii
-import ipaddress
+try:
+    from ipaddress import IPv4Address, IPv6Address, ip_address
+except ImportError:
+    from ipaddr import IPv4Address, IPv6Address, IPAddress as ipaddress
 import os
 
 import pytest
@@ -1088,20 +1091,20 @@
             x509.IPAddress(1.3)
 
     def test_repr(self):
-        gn = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
+        gn = x509.IPAddress(IPv4Address(u"127.0.0.1"))
         assert repr(gn) == "<IPAddress(value=127.0.0.1)>"
 
-        gn2 = x509.IPAddress(ipaddress.IPv6Address(u"ff::"))
+        gn2 = x509.IPAddress(IPv6Address(u"ff::"))
         assert repr(gn2) == "<IPAddress(value=ff::)>"
 
     def test_eq(self):
-        gn = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
-        gn2 = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
+        gn = x509.IPAddress(IPv4Address(u"127.0.0.1"))
+        gn2 = x509.IPAddress(IPv4Address(u"127.0.0.1"))
         assert gn == gn2
 
     def test_ne(self):
-        gn = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.1"))
-        gn2 = x509.IPAddress(ipaddress.IPv4Address(u"127.0.0.2"))
+        gn = x509.IPAddress(IPv4Address(u"127.0.0.1"))
+        gn2 = x509.IPAddress(IPv4Address(u"127.0.0.2"))
         assert gn != gn2
         assert gn != object()
 
@@ -1251,8 +1254,8 @@
 
         ip = san.get_values_for_type(x509.IPAddress)
         assert [
-            ipaddress.ip_address(u"127.0.0.1"),
-            ipaddress.ip_address(u"ff::")
+            ip_address(u"127.0.0.1"),
+            ip_address(u"ff::")
         ] == ip
 
     def test_dirname(self, backend):
@@ -1351,8 +1354,8 @@
             ])
         ] == dirname
         assert [
-            ipaddress.ip_address(u"127.0.0.1"),
-            ipaddress.ip_address(u"ff::")
+            ip_address(u"127.0.0.1"),
+            ip_address(u"ff::")
         ] == ip
 
     def test_invalid_rfc822name(self, backend):
