Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
Service Desk
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
Benjamin J. Thompson
Tor
Commits
76ec8915
Commit
76ec8915
authored
9 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
When we infer the master key from the certificate, save it to disk.
parent
5d76acfc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/or/routerkeys.c
+10
-1
10 additions, 1 deletion
src/or/routerkeys.c
src/test/test_keygen.sh
+2
-2
2 additions, 2 deletions
src/test/test_keygen.sh
with
12 additions
and
3 deletions
src/or/routerkeys.c
+
10
−
1
View file @
76ec8915
...
...
@@ -697,11 +697,20 @@ load_ed_keys(const or_options_t *options, time_t now)
FAIL
(
"Missing identity key"
);
}
else
{
log_warn
(
LD_OR
,
"Master public key was absent; inferring from "
"public key in signing certificate"
);
"public key in signing certificate
and saving to disk.
"
);
tor_assert
(
check_signing_cert
);
id
=
tor_malloc_zero
(
sizeof
(
*
id
));
memcpy
(
&
id
->
pubkey
,
&
check_signing_cert
->
signing_key
,
sizeof
(
ed25519_public_key_t
));
fname
=
options_get_datadir_fname2
(
options
,
"keys"
,
"ed25519_master_id_public_key"
);
if
(
ed25519_pubkey_write_to_file
(
&
id
->
pubkey
,
fname
,
"type0"
)
<
0
)
{
log_warn
(
LD_OR
,
"Error while attempting to write master public key "
"to disk"
);
tor_free
(
fname
);
goto
err
;
}
tor_free
(
fname
);
}
}
if
(
tor_mem_is_zero
((
char
*
)
id
->
seckey
.
seckey
,
sizeof
(
id
->
seckey
)))
...
...
This diff is collapsed.
Click to expand it.
src/test/test_keygen.sh
+
2
−
2
View file @
76ec8915
...
...
@@ -7,7 +7,7 @@ umask 077
set
-e
if
[
$#
-eq
0
]
||
[
!
-f
${
1
}
]
||
[
!
-x
${
1
}
]
;
then
if
[
"
$TESTING_TOR_BINARY
"
=
""
]
;
then
if
[
"
$TESTING_TOR_BINARY
"
=
""
]
;
then
echo
"Usage:
${
0
}
PATH_TO_TOR [case-number]"
exit
1
fi
...
...
@@ -329,7 +329,7 @@ cp "${SRC}/keys/ed25519_signing_secret_key" "${ME}/keys/"
${
TOR
}
--DataDirectory
"
${
ME
}
"
--list-fingerprint
>
/dev/null
||
die
"Failed when starting with only signing material"
check_no_file
"
${
ME
}
/keys/ed25519_master_id_secret_key"
check_
no_
file
"
${
ME
}
/keys/ed25519_master_id_public_key"
check_file
"
${
ME
}
/keys/ed25519_master_id_public_key"
check_keys_eq ed25519_signing_secret_key
check_keys_eq ed25519_signing_cert
...
...
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