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

Bug29960 cant fail #908

Merged
merged 9 commits into from Apr 12, 2019
Merged

Conversation

Labels
None yet
Projects
None yet
4 participants
@teor2345
Copy link
Contributor

@teor2345 teor2345 commented Apr 5, 2019

No description provided.

teor2345 added 8 commits Apr 5, 2019
(These functions look pretty unified to me.)

Part of 29660.
... and ed25519_public_to_base64(). Also remove all checks for the return
values, which were redundant anyway, because the functions never failed.

Part of 29960.
…64()

And fix the documentation on the function: it does produce trailing
"="s as padding.

Also remove all checks for the return value, which were redundant anyway,
because the function never failed.

Part of 29660.
…64()

Also remove all checks for the return value, which were redundant anyway,
because the function never failed.

Part of 29660.
base64_decode() does not require padding.

Part of 29660.
@coveralls
Copy link

@coveralls coveralls commented Apr 5, 2019

Pull Request Test Coverage Report for Build 4710

  • 29 of 31 (93.55%) changed or added relevant lines in 6 files are covered.
  • 872 unchanged lines in 11 files lost coverage.
  • Overall coverage increased (+0.02%) to 62.28%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/feature/dirauth/dirvote.c 0 1 0.0%
src/feature/hs/hs_client.c 2 3 66.67%
Files with Coverage Reduction New Missed Lines %
src/ext/getdelim.c 1 0.0%
src/feature/hs/hs_client.c 1 50.0%
src/core/or/relay.c 1 49.33%
src/lib/malloc/map_anon.c 1 96.67%
src/lib/crypt_ops/crypto_rand_fast.c 2 97.56%
src/lib/buf/buffers.c 6 91.03%
src/lib/crypt_ops/crypto_init.c 7 83.05%
src/core/or/circuitpadding.c 20 92.47%
src/feature/nodelist/networkstatus.c 137 53.29%
src/core/mainloop/connection.c 233 25.58%
Totals Coverage Status
Change from base Build 4574: 0.02%
Covered Lines: 46201
Relevant Lines: 74183

💛 - Coveralls

if (strlen(input) != ED25519_SIG_BASE64_LEN)
return -1;
char buf[ED25519_SIG_BASE64_LEN+3];
char buf[ED25519_SIG_BASE64_LEN+1];
memcpy(buf, input, ED25519_SIG_BASE64_LEN);
Copy link
Contributor

@nmathewson nmathewson Apr 9, 2019

I think we don't need to use 'buf' here at all any more; we could just use "input" directly.

Copy link
Contributor Author

@teor2345 teor2345 Apr 12, 2019

👍

@torproject-pusher torproject-pusher merged commit ebbc2c3 into torproject:master Apr 12, 2019
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment