Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
ed1b0220
Commit
ed1b0220
authored
5 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
dhtnode: always load node certificate
parent
739f4d0c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/dhtnode.cpp
+1
-5
1 addition, 5 deletions
tools/dhtnode.cpp
with
1 addition
and
5 deletions
tools/dhtnode.cpp
+
1
−
5
View file @
ed1b0220
...
@@ -532,19 +532,15 @@ main(int argc, char **argv)
...
@@ -532,19 +532,15 @@ main(int argc, char **argv)
auto
node
=
std
::
make_shared
<
DhtRunner
>
();
auto
node
=
std
::
make_shared
<
DhtRunner
>
();
try
{
try
{
#ifndef OPENDHT_PROXY_SERVER
if
(
not
params
.
id
.
first
and
params
.
generate_identity
)
{
if
(
not
params
.
id
.
first
and
params
.
generate_identity
)
{
#endif
auto
node_ca
=
std
::
make_unique
<
dht
::
crypto
::
Identity
>
(
dht
::
crypto
::
generateEcIdentity
(
"DHT Node CA"
));
auto
node_ca
=
std
::
make_unique
<
dht
::
crypto
::
Identity
>
(
dht
::
crypto
::
generateEcIdentity
(
"DHT Node CA"
));
params
.
id
=
dht
::
crypto
::
generateIdentity
(
"DHT Node"
,
*
node_ca
);
params
.
id
=
dht
::
crypto
::
generateIdentity
(
"DHT Node"
,
*
node_ca
);
if
(
not
params
.
save_identity
.
empty
())
{
if
(
not
params
.
save_identity
.
empty
())
{
dht
::
crypto
::
saveIdentity
(
*
node_ca
,
params
.
save_identity
+
"_ca"
,
params
.
privkey_pwd
);
dht
::
crypto
::
saveIdentity
(
*
node_ca
,
params
.
save_identity
+
"_ca"
,
params
.
privkey_pwd
);
dht
::
crypto
::
saveIdentity
(
params
.
id
,
params
.
save_identity
,
params
.
privkey_pwd
);
dht
::
crypto
::
saveIdentity
(
params
.
id
,
params
.
save_identity
,
params
.
privkey_pwd
);
}
}
#ifndef OPENDHT_PROXY_SERVER
}
}
#endif
dht
::
DhtRunner
::
Config
config
{};
dht
::
DhtRunner
::
Config
config
{};
config
.
dht_config
.
node_config
.
network
=
params
.
network
;
config
.
dht_config
.
node_config
.
network
=
params
.
network
;
config
.
dht_config
.
node_config
.
maintain_storage
=
false
;
config
.
dht_config
.
node_config
.
maintain_storage
=
false
;
...
...
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