Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
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
Show more breadcrumbs
Dmitry Puzyrkov
celllframe-node
Commits
0ee8f62b
Commit
0ee8f62b
authored
4 years ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Patches
Plain Diff
[*] Cert metadata debugged
parent
b7451a83
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cellframe-sdk
+1
-1
1 addition, 1 deletion
cellframe-sdk
python-cellframe
+1
-1
1 addition, 1 deletion
python-cellframe
sources/main_node_tool.c
+9
-3
9 additions, 3 deletions
sources/main_node_tool.c
with
11 additions
and
5 deletions
cellframe-sdk
@
f6866996
Compare
ca871a2b
...
f6866996
Subproject commit
ca871a2bf1a314d0672cd11a0d8e6e3e3eec3d62
Subproject commit
f68669962a4f63b020f5d3cef47b02202071cea1
This diff is collapsed.
Click to expand it.
python-cellframe
@
1307c3fb
Compare
386787b6
...
1307c3fb
Subproject commit
386787b6ad82aa9bdf8dc75b09ffd1175dd5d380
Subproject commit
1307c3fb4e2ff23ccde8e38d85ef6274a9315016
This diff is collapsed.
Click to expand it.
sources/main_node_tool.c
+
9
−
3
View file @
0ee8f62b
...
...
@@ -98,6 +98,9 @@
#include
"cellframe_node.h"
#endif
#undef log_it
#define log_it(_log_level, string, ...) printf(string, ##__VA_ARGS__)
static
int
s_init
(
int
argc
,
const
char
*
argv
[]
);
static
void
s_help
(
);
...
...
@@ -182,7 +185,7 @@ int main(int argc, const char **argv)
if
(
l_data_file
)
{}
}
else
{
log_it
(
L_ERROR
,
"Cert index %d can't be found in wallet with %u certs inside"
log_it
(
L_ERROR
,
"Cert index %d can't be found in wallet with %
l
u certs inside"
,
l_cert_index
,
l_wallet_certs_number
);
s_help
();
exit
(
-
3002
);
...
...
@@ -325,12 +328,12 @@ int main(int argc, const char **argv)
exit
(
-
500
);
}
DAP_DELETE
(
l_cert_path
);
}
else
if
(
strcmp
(
argv
[
2
],
"add_meta"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
2
],
"add_meta
data
"
)
==
0
)
{
if
(
argc
>=
5
)
{
const
char
*
l_cert_name
=
argv
[
3
];
dap_cert_t
*
l_cert
=
dap_cert_add_file
(
l_cert_name
,
s_system_ca_dir
);
if
(
l_cert
)
{
char
**
l_params
=
dap_strsplit
(
argv
[
3
],
":"
,
4
);
char
**
l_params
=
dap_strsplit
(
argv
[
4
],
":"
,
4
);
dap_cert_metadata_type_t
l_type
=
(
dap_cert_metadata_type_t
)
atoi
(
l_params
[
1
]);
if
(
l_type
==
DAP_CERT_META_STRING
||
l_type
==
DAP_CERT_META_SIGN
||
l_type
==
DAP_CERT_META_CUSTOM
)
{
dap_cert_add_meta
(
l_cert
,
l_params
[
0
],
l_type
,
(
void
*
)
l_params
[
3
],
strtoul
(
l_params
[
2
],
NULL
,
10
));
...
...
@@ -491,4 +494,7 @@ static void s_help()
printf
(
" * Export only public key from <cert name> and stores it
\n
"
);
printf
(
"
\t
%s cert create_cert_pkey <cert name> <new cert name>
\n\n
"
,
dap_get_appname
());
printf
(
" * Add metadata item to <cert name>
\n
"
);
printf
(
"
\t
%s cert add_metadata <cert name> <key:type:length:value>
\n\n
"
,
dap_get_appname
());
}
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