]> git.kaiwu.me - nginx.git/commitdiff
fix recognition of SSLv2 Client Hello Packet large than 255 bytes
authorIgor Sysoev <igor@sysoev.ru>
Mon, 5 Jul 2010 13:35:20 +0000 (13:35 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 5 Jul 2010 13:35:20 +0000 (13:35 +0000)
src/http/ngx_http_request.c

index 651cda7e08e2061797ff3320370fe1bbd27c76d1..f1fab8a4fab45cdeb9ff0cef6202669550cc6a8c 100644 (file)
@@ -555,7 +555,7 @@ ngx_http_ssl_handshake(ngx_event_t *rev)
     }
 
     if (n == 1) {
-        if (buf[0] == 0x80 /* SSLv2 */ || buf[0] == 0x16 /* SSLv3/TLSv1 */) {
+        if (buf[0] & 0x80 /* SSLv2 */ || buf[0] == 0x16 /* SSLv3/TLSv1 */) {
             ngx_log_debug1(NGX_LOG_DEBUG_HTTP, rev->log, 0,
                            "https ssl handshake: 0x%02Xd", buf[0]);