Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-12-12 23:55:27 +0300
committerAdam Langley <agl@google.com>2014-12-14 02:22:21 +0300
commit82c9e90a5860bd93851cf7399bea3fc5bd03cdf2 (patch)
tree81dff00a59a777078d6883ff0d7b6b520e8f200c /ssl/s3_srvr.c
parent4b755cb0da7aace30815164ef2e13031707f6b7f (diff)
Merge SSLv23_method and DTLS_ANY_VERSION.
This makes SSLv23_method go through DTLS_ANY_VERSION's version negotiation logic. This allows us to get rid of duplicate ClientHello logic. For compatibility, SSL_METHOD is now split into SSL_PROTOCOL_METHOD and a version. The legacy version-locked methods set min_version and max_version based this version field to emulate the original semantics. As a bonus, we can now handle fragmented ClientHello versions now. Because SSLv23_method is a silly name, deprecate that too and introduce TLS_method. Change-Id: I8b3df2b427ae34c44ecf972f466ad64dc3dbb171
Diffstat (limited to 'ssl/s3_srvr.c')
-rw-r--r--ssl/s3_srvr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c
index b320140f..eaeb2b26 100644
--- a/ssl/s3_srvr.c
+++ b/ssl/s3_srvr.c
@@ -1123,7 +1123,7 @@ int ssl3_get_client_hello(SSL *s)
}
}
- if (!s->s3->have_version && s->method->version == DTLS_ANY_VERSION)
+ if (!s->s3->have_version)
{
/* Select version to use */
uint16_t version = ssl3_get_mutual_version(s, client_version);
@@ -1137,6 +1137,10 @@ int ssl3_get_client_hello(SSL *s)
s->version = version;
s->enc_method = ssl3_get_enc_method(version);
assert(s->enc_method != NULL);
+ /* At this point, the connection's version is known and
+ * s->version is fixed. Begin enforcing the record-layer
+ * version. */
+ s->s3->have_version = 1;
}
else if (SSL_IS_DTLS(s) ? (s->client_version > s->version)
: (s->client_version < s->version))
@@ -1152,12 +1156,6 @@ int ssl3_get_client_hello(SSL *s)
goto f_err;
}
- /* At this point, the connection's version is known and s->version is
- * fixed. Begin enforcing the record-layer version. Note: SSLv23_method
- * currently determines its version sooner, but it will later be moved
- * to this point. */
- s->s3->have_version = 1;
-
s->hit=0;
/* Versions before 0.9.7 always allow clients to resume sessions in renegotiation.
* 0.9.7 and later allow this by default, but optionally ignore resumption requests