-
Notifications
You must be signed in to change notification settings - Fork 724
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
docs: add citations for alert behavior #4198
Conversation
7a60770
to
beb50d6
Compare
tls/s2n_alerts.c
Outdated
/* | ||
*= https://tools.ietf.org/rfc/rfc8446#section-6 | ||
*# Unknown Alert types MUST be treated as error alerts. | ||
* | ||
* All other alerts are treated as fatal errors. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a comment comes after the compliance comment I read it as a clarification of the compliance comment. Like "Unknown Alert types MUST be treated as error alerts, and all other alerts are treated as fatal errors." Like "other alerts" sounds like it means "other than unknown alert types". If it comes before it's clearer that's not true.
/* | |
*= https://tools.ietf.org/rfc/rfc8446#section-6 | |
*# Unknown Alert types MUST be treated as error alerts. | |
* | |
* All other alerts are treated as fatal errors. | |
*/ | |
/* All other alerts are treated as fatal errors. | |
* | |
*= https://tools.ietf.org/rfc/rfc8446#section-6 | |
*# Unknown Alert types MUST be treated as error alerts. | |
*/ |
6be17b7
to
83ec1ef
Compare
83ec1ef
to
ac02b26
Compare
Description of changes:
s2n deviates from the RFC when handling alerts. The RFC calls for sending fatal alerts but s2n-tls defaults to sending close_notify alerts (which are level
warning
). This is intentional and and done to avoid potential side-channel attacks.Since this is atypical behavior which often confuses new users, this PR adds duvet citations and expands on the comments to increase discoverability.
I also added a compliance comment for alert receiving behavior.
Is this a refactor change? If so, how have you proved that the intended behavior hasn't changed?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.