Add a comment around the set_{min,max}_version logic.

It's not immediately obvious what's going on here.

Change-Id: Ibbba80a6ff9ace4d88e89a42efc270b77b4fad12
Reviewed-on: https://boringssl-review.googlesource.com/14368
Reviewed-by: Steven Valdez <svaldez@chromium.org>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Steven Valdez <svaldez@chromium.org>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
David Benjamin
2017-03-25 23:28:45 +00:00
committed by CQ bot account: commit-bot@chromium.org
parent e3843d41b9
commit 7d2dbc3791
+2
View File
@@ -924,6 +924,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
static int set_min_version(const SSL_PROTOCOL_METHOD *method, uint16_t *out,
uint16_t version) {
/* Zero is interpreted as the default minimum version. */
if (version == 0) {
*out = method->min_version;
return 1;
@@ -938,6 +939,7 @@ static int set_min_version(const SSL_PROTOCOL_METHOD *method, uint16_t *out,
static int set_max_version(const SSL_PROTOCOL_METHOD *method, uint16_t *out,
uint16_t version) {
/* Zero is interpreted as the default maximum version. */
if (version == 0) {
*out = method->max_version;
/* TODO(svaldez): Enable TLS 1.3 by default once fully implemented. */