Klaus Demo nginx / b93931a
Stream ssl_preread: added SSLv2 Client Hello support. In particular, it was not possible to obtain SSLv2 protocol version. Sergey Kandaurov 3 years ago
1 changed file(s) with 14 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
147147 last = c->buffer->last;
148148
149149 while (last - p >= 5) {
150
151 if ((p[0] & 0x80) && p[2] == 1 && (p[3] == 0 || p[3] == 3)) {
152 ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
153 "ssl preread: version 2 ClientHello");
154 ctx->version[0] = p[3];
155 ctx->version[1] = p[4];
156 return NGX_OK;
157 }
150158
151159 if (p[0] != 0x16) {
152160 ngx_log_debug0(NGX_LOG_DEBUG_STREAM, ctx->log, 0,
506514 ngx_str_null(&version);
507515
508516 switch (ctx->version[0]) {
509 case 2:
510 ngx_str_set(&version, "SSLv2");
517 case 0:
518 switch (ctx->version[1]) {
519 case 2:
520 ngx_str_set(&version, "SSLv2");
521 break;
522 }
511523 break;
512524 case 3:
513525 switch (ctx->version[1]) {