Add some unit tests for OpenSSL.crypto.PKey and fix a bug in the error handling
diff --git a/src/crypto/pkey.c b/src/crypto/pkey.c
index 201960f..07fe423 100644
--- a/src/crypto/pkey.c
+++ b/src/crypto/pkey.c
@@ -69,8 +69,7 @@
     }
 
     PyErr_SetString(crypto_Error, "No such key type");
-    Py_INCREF(Py_None);
-    return Py_None;
+    return NULL;
 }
 
 static char crypto_PKey_bits_doc[] = "\n\