Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
sergi
Tor
Commits
2c884fd8
Commit
2c884fd8
authored
10 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'rl1987/feature10427'
parents
0793ef86
36e77162
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/ticket10427
+4
-0
4 additions, 0 deletions
changes/ticket10427
src/or/router.c
+21
-0
21 additions, 0 deletions
src/or/router.c
with
25 additions
and
0 deletions
changes/ticket10427
0 → 100644
+
4
−
0
View file @
2c884fd8
o Minor features:
- When identity keypair is generated for first time, log a
congratulatory message that points to new relay lifecycle
document. Implements feature 10427.
This diff is collapsed.
Click to expand it.
src/or/router.c
+
21
−
0
View file @
2c884fd8
...
...
@@ -369,6 +369,26 @@ rotate_onion_key(void)
tor_free
(
fname_prev
);
}
/** Log greeting message that points to new relay lifecycle document the
* first time this function has been called.
*/
static
void
log_new_relay_greeting
(
void
)
{
static
int
already_logged
=
0
;
if
(
already_logged
)
return
;
tor_log
(
LOG_NOTICE
,
LD_GENERAL
,
"You are running a new relay. "
"Thanks for helping the Tor network! If you wish to know "
"what will happen in the upcoming weeks regarding its usage, "
"have a look at https://blog.torproject.org/blog/lifecycle-of"
"-a-new-relay"
);
already_logged
=
1
;
}
/** Try to read an RSA key from <b>fname</b>. If <b>fname</b> doesn't exist
* and <b>generate</b> is true, create a new RSA key and save it in
* <b>fname</b>. Return the read/created key, or NULL on error. Log all
...
...
@@ -413,6 +433,7 @@ init_key_from_file(const char *fname, int generate, int severity)
goto
error
;
}
log_info
(
LD_GENERAL
,
"Generated key seems valid"
);
log_new_relay_greeting
();
if
(
crypto_pk_write_private_key_to_filename
(
prkey
,
fname
))
{
tor_log
(
severity
,
LD_FS
,
"Couldn't write generated key to
\"
%s
\"
."
,
fname
);
...
...
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