X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=keyconvert%2Fkeyconvertext.c;fp=keyconvert%2Fkeyconvertext.c;h=0000000000000000000000000000000000000000;hb=9ec8efcc4a9a0924d0dc822d07e4faeb9548fdf2;hp=d2c9e13a0f2d144e8ed5b03148d233e45dfbe812;hpb=9fadbf450732b94a723471b80bfa6e10a710b85c;p=sfa.git diff --git a/keyconvert/keyconvertext.c b/keyconvert/keyconvertext.c deleted file mode 100644 index d2c9e13a..00000000 --- a/keyconvert/keyconvertext.c +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#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); -} -