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

Cleanup and provide only one underlying hex encoding/decoding implementation #2759

Closed
ttjsu-aws opened this issue Apr 23, 2021 · 0 comments · Fixed by #4664
Closed

Cleanup and provide only one underlying hex encoding/decoding implementation #2759

ttjsu-aws opened this issue Apr 23, 2021 · 0 comments · Fixed by #4664
Labels

Comments

@ttjsu-aws
Copy link
Contributor

Problem:

We currently have 3 implementation of hex within s2n that cater to different internal data_structures/use-cases, namely:

S2N_RESULT s2n_key_log_hex_encode(struct s2n_stuffer *output, uint8_t *bytes, size_t len);
extern int s2n_stuffer_read_hex(struct s2n_stuffer *stuffer, struct s2n_stuffer *out, uint32_t n);
extern int s2n_hex_string_to_bytes(const uint8_t *str, struct s2n_blob *blob);
int s2n_str_hex_to_bytes(const uint8_t *hex, uint8_t *out_bytes, uint32_t *out_bytes_len);

We need to cleanup these hex functions and provide only one underlying solution for hex encoding and decoding.

Solution:

Cleanup the utility hex encoding and decoding implementations and provide only one underlying solution for hex encoding and decoding.

  • Does this change what S2N sends over the wire? No
  • Does this change any public APIs? No, utility functions
  • Which versions of TLS will this impact? All.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants