Browse Source

SPDY: fixed compiling error with ssl module

pull/591/head
Xiaochen Wang 10 years ago
parent
commit
2b1c7ab0ed
  1. 13
      src/http/modules/ngx_http_ssl_module.c
  2. 13
      src/http/ngx_http_request.c

13
src/http/modules/ngx_http_ssl_module.c

@ -385,20 +385,13 @@ ngx_http_ssl_npn_advertised(ngx_ssl_conn_t *ssl_conn,
#if (NGX_HTTP_SPDY)
{
ngx_http_connection_t *hc;
ngx_http_spdy_srv_conf_t *sscf;
ngx_http_connection_t *hc;
hc = c->data;
sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_spdy_module);
if (hc->addr_conf->spdy) {
if (sscf->version == NGX_SPDY_VERSION_V3) {
*out = (unsigned char *) NGX_SPDY_V3_NPN_ADVERTISE NGX_HTTP_NPN_ADVERTISE;
*outlen = sizeof(NGX_SPDY_V3_NPN_ADVERTISE NGX_HTTP_NPN_ADVERTISE) - 1;
} else {
*out = (unsigned char *) NGX_SPDY_NPN_ADVERTISE NGX_HTTP_NPN_ADVERTISE;
*outlen = sizeof(NGX_SPDY_NPN_ADVERTISE NGX_HTTP_NPN_ADVERTISE) - 1;
}
*out = (unsigned char *) NGX_SPDY_NPN_ADVERTISE NGX_HTTP_NPN_ADVERTISE;
*outlen = sizeof(NGX_SPDY_NPN_ADVERTISE NGX_HTTP_NPN_ADVERTISE) - 1;
return SSL_TLSEXT_ERR_OK;
}

13
src/http/ngx_http_request.c

@ -902,20 +902,9 @@ ngx_http_ssl_handshake_handler(ngx_connection_t *c)
&& (defined TLSEXT_TYPE_application_layer_protocol_negotiation \
|| defined TLSEXT_TYPE_next_proto_neg))
{
ngx_http_connection_t *hc;
ngx_http_spdy_srv_conf_t *sscf;
unsigned int len;
const unsigned char *data;
ngx_str_t spdy;
hc = c->data;
sscf = ngx_http_get_module_srv_conf(hc->conf_ctx, ngx_http_spdy_module);
if (sscf->version == NGX_SPDY_VERSION_V3) {
ngx_str_set(&spdy, NGX_SPDY_V3_NPN_NEGOTIATED);
} else {
ngx_str_set(&spdy, NGX_SPDY_NPN_NEGOTIATED);
}
static const ngx_str_t spdy = ngx_string(NGX_SPDY_NPN_NEGOTIATED);
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
SSL_get0_alpn_selected(c->ssl->connection, &data, &len);

Loading…
Cancel
Save