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

Allow xtt_save_to_file to set file permissions #114

Closed
3 tasks done
drbild opened this issue May 13, 2019 · 0 comments · Fixed by #116
Closed
3 tasks done

Allow xtt_save_to_file to set file permissions #114

drbild opened this issue May 13, 2019 · 0 comments · Fixed by #116
Assignees

Comments

@drbild
Copy link
Contributor

drbild commented May 13, 2019

xtt_save_to_file is used by enftun to save the certificate and private key. The private key should not be world-readable, which is the default when writing a file (on many systems).

In util/file_io.h/c:

  • Add the file permissions mask as a third argument to xtt_save_to_file
  • Add wrapper function xtt_save_key_to_file with mask 0600
  • Add wrapper function xtt_save_cert_to_file with mask 0644.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants