diff --git a/include/wrapping_cert.h b/include/wrapping_cert.h index 9576643cf56ff6aa8ff86d8a8a07e027669a70fd..56d0a0501ce2846be54a6806b658167d7dd6b955 100644 --- a/include/wrapping_cert.h +++ b/include/wrapping_cert.h @@ -4,6 +4,9 @@ #include "dap_common.h" #include "dap_cert.h" +#ifdef __cplusplus +extern "C"{ +#endif typedef struct PyCryptoCert{ @@ -42,7 +45,7 @@ static PyTypeObject dapCrypto_dapCryptoCertType = { 0, /* tp_as_buffer */ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - "Crypto objects", /* tp_doc */ + "Crypto cert object", /* tp_doc */ 0, /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ @@ -62,3 +65,7 @@ static PyTypeObject dapCrypto_dapCryptoCertType = { PyType_GenericNew, /* tp_new */ }; +#ifdef __cplusplus +} +#endif + diff --git a/src/wrapping_cert.c b/src/wrapping_cert.c new file mode 100644 index 0000000000000000000000000000000000000000..37a75337e8b194d125b1be5047e5fcbfa1587322 --- /dev/null +++ b/src/wrapping_cert.c @@ -0,0 +1,16 @@ +#include "wrapping_cert.h" + +int dap_cert_init_py(void){ + return dap_cert_init(); +} +void dap_cert_deinit_py(void){ + dap_cert_deinit(); +} +PyObject* dap_cert_add_folder_py(PyObject *self, PyObject *args){ + (void)self; + const char *a_folder_path; + if(!PyArg_ParseTuple(args, "s", &a_folder_path)) + return NULL; + dap_cert_add_folder(a_folder_path); + return PyLong_FromLong(0); +}