Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

Labels
None yet
Projects
None yet
5 participants
@neelchauhan
Copy link
Contributor

@neelchauhan neelchauhan commented Jan 11, 2020

For the ticket here.

@coveralls
Copy link

@coveralls coveralls commented Jan 11, 2020

Pull Request Test Coverage Report for Build 8475

  • 13 of 22 (59.09%) changed or added relevant lines in 2 files are covered.
  • 9226 unchanged lines in 80 files lost coverage.
  • Overall coverage increased (+0.7%) to 63.999%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/app/main/main.c 0 2 0.0%
src/feature/relay/router.c 13 20 65.0%
Files with Coverage Reduction New Missed Lines %
src/core/crypto/hs_ntor.c 1 97.9%
src/core/or/or.h 1 88.89%
src/core/or/or_sys.c 2 86.67%
src/lib/confmgt/type_defs.c 2 98.6%
src/app/main/shutdown.c 3 73.91%
src/app/main/subsysmgr.c 3 84.09%
src/core/or/sendme.c 3 73.02%
src/lib/confmgt/unitparse.c 3 95.16%
src/feature/dirparse/microdesc_parse.c 4 95.49%
src/lib/net/address.h 4 73.33%
Totals Coverage Status
Change from base Build 7725: 0.7%
Covered Lines: 50705
Relevant Lines: 79228

💛 - Coveralls

@@ -1033,12 +1033,14 @@ sandbox_init_filter(void)

OPEN_DATADIR("approved-routers");
OPEN_DATADIR_SUFFIX("fingerprint", ".tmp");
OPEN_DATADIR_SUFFIX("ed25519_identity", ".tmp");
Copy link
Contributor

@teor2345 teor2345 Jan 15, 2020

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.

@@ -881,6 +881,43 @@ router_write_fingerprint(int hashed)
return result;
}

STATIC int
router_write_ed25519_identity(void)
Copy link
Contributor

@teor2345 teor2345 Jan 15, 2020

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?

{
char *keydir = NULL, *cp = NULL;
const char *fname = hashed ? "hashed-fingerprint" :
"fingerprint";
(ed25519_identity ? "ed25519_identity" : "fingerprint");
Copy link
Contributor

@dgoulet-tor dgoulet-tor Feb 13, 2020

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.

@torproject-pusher torproject-pusher deleted the branch torproject:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment