mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
ALPN support, based on mod_spdy/mod_h2 patch set
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1670397 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -160,6 +160,9 @@ static void modssl_ctx_init(modssl_ctx_t *mctx, apr_pool_t *p)
|
||||
SSL_CONF_CTX_set_flags(mctx->ssl_ctx_config, SSL_CONF_FLAG_CERTIFICATE);
|
||||
mctx->ssl_ctx_param = apr_array_make(p, 5, sizeof(ssl_ctx_param_t));
|
||||
#endif
|
||||
#if defined(HAVE_TLS_ALPN) || defined(HAVE_TLS_NPN)
|
||||
mctx->ssl_alpn_pref = apr_array_make(p, 5, sizeof(const char *));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void modssl_ctx_init_proxy(SSLSrvConfigRec *sc,
|
||||
@@ -304,6 +307,9 @@ static void modssl_ctx_cfg_merge(apr_pool_t *p,
|
||||
#ifdef HAVE_SSL_CONF_CMD
|
||||
cfgMergeArray(ssl_ctx_param);
|
||||
#endif
|
||||
#if defined(HAVE_TLS_ALPN) || defined(HAVE_TLS_NPN)
|
||||
cfgMergeArray(ssl_alpn_pref);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void modssl_ctx_cfg_merge_proxy(apr_pool_t *p,
|
||||
@@ -1857,6 +1863,16 @@ const char *ssl_cmd_SSLOpenSSLConfCmd(cmd_parms *cmd, void *dcfg,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_TLS_ALPN) || defined(HAVE_TLS_NPN)
|
||||
const char *ssl_cmd_SSLAlpnPreference(cmd_parms *cmd, void *dcfg,
|
||||
const char *protocol)
|
||||
{
|
||||
SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
|
||||
APR_ARRAY_PUSH(sc->server->ssl_alpn_pref, const char *) = protocol;
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SRP
|
||||
|
||||
const char *ssl_cmd_SSLSRPVerifierFile(cmd_parms *cmd, void *dcfg,
|
||||
|
Reference in New Issue
Block a user