diff options
author | Simon L. B. Nielsen <simon@FreeBSD.org> | 2010-02-28 18:49:43 +0000 |
---|---|---|
committer | Simon L. B. Nielsen <simon@FreeBSD.org> | 2010-02-28 18:49:43 +0000 |
commit | f7a1b4761cf3f798e1b42d703d38221b47ce1eec (patch) | |
tree | 21770f10e7f26d05fc9b0fa96a7b6d7b107552c5 /ssl/s23_srvr.c | |
parent | f0c2a617dfb432d01bc5a716eb18dae12e6b45e3 (diff) |
Notes
Diffstat (limited to 'ssl/s23_srvr.c')
-rw-r--r-- | ssl/s23_srvr.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index ba06e7ae2eb9..be05911e96a2 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -315,7 +315,7 @@ int ssl23_get_client_hello(SSL *s) (p[1] == SSL3_VERSION_MAJOR) && (p[5] == SSL3_MT_CLIENT_HELLO) && ((p[3] == 0 && p[4] < 5 /* silly record length? */) - || (p[9] == p[1]))) + || (p[9] >= p[1]))) { /* * SSLv3 or tls1 header @@ -339,6 +339,13 @@ int ssl23_get_client_hello(SSL *s) v[1] = TLS1_VERSION_MINOR; #endif } + /* if major version number > 3 set minor to a value + * which will use the highest version 3 we support. + * If TLS 2.0 ever appears we will need to revise + * this.... + */ + else if (p[9] > SSL3_VERSION_MAJOR) + v[1]=0xff; else v[1]=p[10]; /* minor version according to client_version */ if (v[1] >= TLS1_VERSION_MINOR) |