1 #include <python2.3/Python.h>
3 #include "keyconvert.h"
5 static PyObject *keyconvert_opensshtoopenssl(PyObject *self, PyObject *args)
12 PyArg_ParseTuple(args, "ss#", &fn, &s, &len);
14 fout = fopen(fn, "wt");
16 return Py_BuildValue("i", 0);
18 fprintf(stdout, "len = %d\n", len);
19 openssh_binary_to_openssl(s, len, fout);
23 return Py_BuildValue("i", 1);
26 static PyMethodDef KeyConvertMethods[] = {
27 {"opensshtoopenssl", keyconvert_opensshtoopenssl, METH_VARARGS, "convert an openssh key to an openssl key"},
28 {NULL, NULL, 0, NULL}};
30 PyMODINIT_FUNC initkeyconvert(void)
32 (void) Py_InitModule("keyconvert", KeyConvertMethods);