Skip to content
Snippets Groups Projects
Commit 5454f042 authored by dmitriy.gerasimov's avatar dmitriy.gerasimov
Browse files

Merge branch 'bugs-3310' into 'master'

[+] Added a wrapper implementation over the dap_cert_add_folder function.

See merge request libdap-crypto-python!6
parents bc4970d5 d2bd935d
No related branches found
No related tags found
1 merge request!26Support 3689
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
#include "dap_common.h" #include "dap_common.h"
#include "dap_cert.h" #include "dap_cert.h"
#ifdef __cplusplus
extern "C"{
#endif
typedef struct PyCryptoCert{ typedef struct PyCryptoCert{
...@@ -42,7 +45,7 @@ static PyTypeObject dapCrypto_dapCryptoCertType = { ...@@ -42,7 +45,7 @@ static PyTypeObject dapCrypto_dapCryptoCertType = {
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DEFAULT |
Py_TPFLAGS_BASETYPE, /* tp_flags */ Py_TPFLAGS_BASETYPE, /* tp_flags */
"Crypto objects", /* tp_doc */ "Crypto cert object", /* tp_doc */
0, /* tp_traverse */ 0, /* tp_traverse */
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
...@@ -62,3 +65,7 @@ static PyTypeObject dapCrypto_dapCryptoCertType = { ...@@ -62,3 +65,7 @@ static PyTypeObject dapCrypto_dapCryptoCertType = {
PyType_GenericNew, /* tp_new */ PyType_GenericNew, /* tp_new */
}; };
#ifdef __cplusplus
}
#endif
#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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment