Commit 478fde5f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Fix compile error

parent bffc0ec8
...@@ -2603,6 +2603,9 @@ StringRef strproto(shrpx_proto proto) { ...@@ -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( ...@@ -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
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment