nghttpx: Fix compile error
This commit is contained in:
parent
bffc0ec87a
commit
478fde5fef
|
@ -2603,6 +2603,9 @@ StringRef strproto(shrpx_proto proto) {
|
||||||
case PROTO_MEMCACHED:
|
case PROTO_MEMCACHED:
|
||||||
return StringRef::from_lit("memcached");
|
return StringRef::from_lit("memcached");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// gcc needs this.
|
||||||
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace shrpx
|
} // namespace shrpx
|
||||||
|
|
|
@ -1325,17 +1325,17 @@ SSL_CTX *setup_downstream_client_ssl_context(
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_downstream_http2_alpn(SSL *ssl) {
|
void setup_downstream_http2_alpn(SSL *ssl) {
|
||||||
auto alpn = util::get_default_alpn();
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||||
// ALPN advertisement
|
// ALPN advertisement
|
||||||
|
auto alpn = util::get_default_alpn();
|
||||||
SSL_set_alpn_protos(ssl, alpn.data(), alpn.size());
|
SSL_set_alpn_protos(ssl, alpn.data(), alpn.size());
|
||||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||||
}
|
}
|
||||||
|
|
||||||
void setup_downstream_http1_alpn(SSL *ssl) {
|
void setup_downstream_http1_alpn(SSL *ssl) {
|
||||||
auto alpn = StringRef::from_lit(NGHTTP2_H1_1_ALPN);
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||||
// ALPN advertisement
|
// ALPN advertisement
|
||||||
|
auto alpn = StringRef::from_lit(NGHTTP2_H1_1_ALPN);
|
||||||
SSL_set_alpn_protos(ssl, alpn.byte(), alpn.size());
|
SSL_set_alpn_protos(ssl, alpn.byte(), alpn.size());
|
||||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue