use the python implementation for keyconvert
[sfa.git] / keyconvert / keyconvertext.c
diff --git a/keyconvert/keyconvertext.c b/keyconvert/keyconvertext.c
deleted file mode 100644 (file)
index d2c9e13..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <python2.3/Python.h>
-
-#include "keyconvert.h"
-
-static PyObject *keyconvert_opensshtoopenssl(PyObject *self, PyObject *args)
-{
-    const char *fn;
-    const char *s;
-    int len;
-    FILE *fout;
-
-    PyArg_ParseTuple(args, "ss#", &fn, &s, &len);
-
-    fout = fopen(fn, "wt");
-    if (fout == NULL) {
-        return Py_BuildValue("i", 0);
-    } else {
-        fprintf(stdout, "len = %d\n", len);
-        openssh_binary_to_openssl(s, len, fout);
-        fclose(fout);
-    }
-
-    return Py_BuildValue("i", 1);
-}
-
-static PyMethodDef KeyConvertMethods[] = {
-    {"opensshtoopenssl", keyconvert_opensshtoopenssl, METH_VARARGS, "convert an openssh key to an openssl key"},
-    {NULL, NULL, 0, NULL}};
-
-PyMODINIT_FUNC initkeyconvert(void)
-{
-    (void) Py_InitModule("keyconvert", KeyConvertMethods);
-}
-