Merge pull request #106 from alex/duplication-reduction

Remove much of the duplication found in the tests
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py
index 02ba8fd..f1a2c08 100644
--- a/cryptography/bindings/openssl/api.py
+++ b/cryptography/bindings/openssl/api.py
@@ -26,17 +26,18 @@
     """
     _modules = [
         "bignum",
-        "conf",
         "bio",
+        "conf",
         "crypto",
         "dh",
         "dsa",
         "engine",
         "err",
         "evp",
+        "opensslv",
         "rand",
         "rsa",
-        "opensslv",
+        "ssl",
     ]
 
     def __init__(self):
@@ -71,7 +72,7 @@
         #   int foo(short);
         self.lib = self.ffi.verify(
             source="\n".join(includes + functions),
-            libraries=["crypto"],
+            libraries=["crypto", "ssl"],
         )
 
         self.lib.OpenSSL_add_all_algorithms()
diff --git a/cryptography/bindings/openssl/err.py b/cryptography/bindings/openssl/err.py
index ffb6096..76c34a0 100644
--- a/cryptography/bindings/openssl/err.py
+++ b/cryptography/bindings/openssl/err.py
@@ -24,7 +24,6 @@
 """
 
 FUNCTIONS = """
-void SSL_load_error_strings();
 void ERR_load_crypto_strings();
 void ERR_free_strings();
 char* ERR_error_string(unsigned long, char *);
diff --git a/cryptography/bindings/openssl/ssl.py b/cryptography/bindings/openssl/ssl.py
new file mode 100644
index 0000000..8aca86e
--- /dev/null
+++ b/cryptography/bindings/openssl/ssl.py
@@ -0,0 +1,26 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+INCLUDES = """
+#include <openssl/ssl.h>
+"""
+
+TYPES = """
+"""
+
+FUNCTIONS = """
+void SSL_load_error_strings();
+"""
+
+MACROS = """
+"""