convert X509Name to a type that can be instantiated
diff --git a/src/crypto/crypto.c b/src/crypto/crypto.c
index b959909..43c8c90 100644
--- a/src/crypto/crypto.c
+++ b/src/crypto/crypto.c
@@ -515,25 +515,6 @@
}
-static char crypto_X509Name_doc[] = "\n\
-The factory function inserted in the module dictionary as a copy\n\
-constructor for X509Name objects.\n\
-\n\
-@param name: An X509Name object to copy\n\
-@return: The X509Name object\n\
-";
-
-static PyObject *
-crypto_X509Name(PyObject *spam, PyObject *args)
-{
- crypto_X509NameObj *name;
-
- if (!PyArg_ParseTuple(args, "O!:X509Name", &crypto_X509Name_Type, &name))
- return NULL;
-
- return (PyObject *)crypto_X509Name_New(X509_NAME_dup(name->x509_name), 1);
-}
-
static char crypto_X509Req_doc[] = "\n\
The factory function inserted in the module dictionary to create X509Req\n\
objects\n\
@@ -639,7 +620,6 @@
{ "load_pkcs7_data", (PyCFunction)crypto_load_pkcs7_data, METH_VARARGS, crypto_load_pkcs7_data_doc },
{ "load_pkcs12", (PyCFunction)crypto_load_pkcs12, METH_VARARGS, crypto_load_pkcs12_doc },
/* Factory functions */
- { "X509Name",(PyCFunction)crypto_X509Name,METH_VARARGS, crypto_X509Name_doc },
{ "X509Req", (PyCFunction)crypto_X509Req, METH_VARARGS, crypto_X509Req_doc },
{ "X509Extension", (PyCFunction)crypto_X509Extension, METH_VARARGS, crypto_X509Extension_doc },
{ "NetscapeSPKI", (PyCFunction)crypto_NetscapeSPKI, METH_VARARGS, crypto_NetscapeSPKI_doc },
@@ -766,7 +746,7 @@
#endif
if (!init_crypto_x509(module))
goto error;
- if (!init_crypto_x509name(dict))
+ if (!init_crypto_x509name(module))
goto error;
if (!init_crypto_x509store(dict))
goto error;