torproject / tor Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tor Trac #30642]: Add an ed25519_identity file to the data directory #1651
Conversation
Pull Request Test Coverage Report for Build 8475
|
src/app/main/main.c
Outdated
| @@ -1033,12 +1033,14 @@ sandbox_init_filter(void) | |||
|
|
|||
| OPEN_DATADIR("approved-routers"); | |||
| OPEN_DATADIR_SUFFIX("fingerprint", ".tmp"); | |||
| OPEN_DATADIR_SUFFIX("ed25519_identity", ".tmp"); | |||
Maybe this should be "ed25519-identity", to match "hashed-fingerprint" and "router-stability"?
(It appears we use underscores for keys, and dashes for user-readable text files.)
Let's see what @mikeperry-tor thinks.
src/feature/relay/router.c
Outdated
| @@ -881,6 +881,43 @@ router_write_fingerprint(int hashed) | |||
| return result; | |||
| } | |||
|
|
|||
| STATIC int | |||
| router_write_ed25519_identity(void) | |||
Rather than copying most of the code from router_write_fingerprint(), you could add an int ed25519_identity argument to router_write_fingerprint(), and re-use most of the code in that function?
src/feature/relay/router.c
Outdated
| { | ||
| char *keydir = NULL, *cp = NULL; | ||
| const char *fname = hashed ? "hashed-fingerprint" : | ||
| "fingerprint"; | ||
| (ed25519_identity ? "ed25519_identity" : "fingerprint"); |
Not sure you can do that. What happens if both hashed = 1 and ed25519_identity = 1 ?
I think you need to keep the hashed as it is and then individually test ed25519_identity after so you can write more than one file.
For the ticket here.
The text was updated successfully, but these errors were encountered: