Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap-crypto-python
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap-crypto-python
Commits
83f950f5
Commit
83f950f5
authored
4 years ago
by
Dmitriy A. Gerasimov
Browse files
Options
Downloads
Patches
Plain Diff
[*] Some updates
parent
c8422b7a
Branches
master
rct
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/wrapping_cert.h
+13
-4
13 additions, 4 deletions
include/wrapping_cert.h
src/wrapping_cert.c
+12
-5
12 additions, 5 deletions
src/wrapping_cert.c
with
25 additions
and
9 deletions
include/wrapping_cert.h
+
13
−
4
View file @
83f950f5
...
...
@@ -51,7 +51,7 @@ PyObject* dap_cert_cert_signs_py(PyObject *self, PyObject *args);
PyObject
*
dap_cert_compare_py
(
PyObject
*
self
,
PyObject
*
args
);
PyObject
*
dap_cert_save_py
(
PyObject
*
self
,
PyObject
*
args
);
PyObject
*
dap_cert_load_py
(
PyObject
*
self
,
PyObject
*
args
);
PyObject
*
dap_cert_
clos
e_py
(
PyObject
*
self
,
PyObject
*
args
);
void
dap_cert_
delet
e_py
(
PyObject
*
self
);
PyObject
*
dap_cert_folder_add_py
(
PyObject
*
self
,
PyObject
*
args
);
PyObject
*
dap_cert_folder_get_py
(
PyObject
*
self
,
PyObject
*
args
);
...
...
@@ -67,8 +67,7 @@ static PyMethodDef g_crypto_cert_methods_py[] = {
{
"certSignAdd"
,
dap_cert_cert_sign_add_py
,
METH_VARARGS
,
""
},
{
"certSigns"
,
dap_cert_cert_signs_py
,
METH_VARARGS
,
""
},
{
"compare"
,
dap_cert_compare_py
,
METH_VARARGS
,
""
},
{
"save"
,
dap_cert_save_py
,
METH_VARARGS
,
""
},
{
"close"
,
dap_cert_close_py
,
METH_VARARGS
,
""
},
{
"save"
,
dap_cert_save_py
,
METH_VARARGS
,
"Save to the first directory in cert folders list"
},
{
NULL
,
NULL
,
0
,
NULL
}
};
...
...
@@ -77,7 +76,7 @@ static PyTypeObject g_crypto_cert_type_py = {
"CellFrame.Cert"
,
/* tp_name */
sizeof
(
PyCryptoCertObject
),
/* tp_basicsize */
0
,
/* tp_itemsize */
0
,
/* tp_dealloc */
dap_cert_delete_py
,
/* tp_dealloc */
0
,
/* tp_print */
0
,
/* tp_getattr */
0
,
/* tp_setattr */
...
...
@@ -112,6 +111,16 @@ static PyTypeObject g_crypto_cert_type_py = {
0
,
/* tp_init */
0
,
/* tp_alloc */
PyType_GenericNew
,
/* tp_new */
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
#ifdef __cplusplus
...
...
This diff is collapsed.
Click to expand it.
src/wrapping_cert.c
+
12
−
5
View file @
83f950f5
...
...
@@ -41,7 +41,7 @@ PyObject* dap_cert_generate_py(PyObject *self, PyObject *args)
const
char
*
l_arg_seed_string
=
NULL
;
if
(
!
PyArg_ParseTuple
(
args
,
"sis"
,
&
l_arg_cert_name
,
&
l_arg_cert_key_type
,
&
l_arg_seed_string
)
){
PyErr_SetString
(
PyExc_SyntaxError
,
"Wrong arguments list"
);
PyErr_SetString
(
PyExc_SyntaxError
,
"Wrong arguments list
in function call
"
);
return
NULL
;
}
...
...
@@ -126,11 +126,9 @@ PyObject* dap_cert_compare_py(PyObject *self, PyObject *args)
PyObject
*
dap_cert_save_py
(
PyObject
*
self
,
PyObject
*
args
)
{
(
void
)
self
;
(
void
)
args
;
/// TODO: Implement it!
PyErr_SetString
(
PyExc_TypeError
,
"Unimplemented function"
);
return
NULL
;
int
res
=
dap_cert_save_to_folder
(((
PyCryptoCertObject
*
)
self
)
->
cert
,
dap_cert_get_folder
(
0
)
);
return
PyLong_FromLong
(
res
);
}
PyObject
*
dap_cert_load_py
(
PyObject
*
self
,
PyObject
*
args
)
...
...
@@ -151,6 +149,15 @@ PyObject* dap_cert_close_py(PyObject *self, PyObject *args)
return
NULL
;
}
void
dap_cert_delete_py
(
PyObject
*
self
)
{
PyCryptoCertObject
*
certObject
=
(
PyCryptoCertObject
*
)
self
;
dap_cert_delete
(
certObject
->
cert
);
Py_TYPE
(
certObject
)
->
tp_free
((
PyObject
*
)
certObject
);
}
PyObject
*
dap_cert_folder_add_py
(
PyObject
*
self
,
PyObject
*
args
)
{
(
void
)
self
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment