Changeset c7710cf in mod_gnutls for src/gnutls_proxy.c
- Timestamp:
- Dec 19, 2018, 1:09:13 PM (4 years ago)
- Branches:
- asyncio, debian/master, master, proxy-ticket
- Children:
- 08c48d7
- Parents:
- 564f33f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_proxy.c
r564f33f rc7710cf 323 323 const char *proxy_alpn = 324 324 apr_table_get(ctxt->c->notes, PROXY_ALPN_NOTE); 325 if (proxy_alpn != NULL)326 {327 // TODO: mod_ssl ssl_engine_io.c does some tokenization of 328 // the input string, so it looks like the API allows329 // multiple protocols.330 gnutls_datum_t alpn_proto = {331 .data = (unsigned char *) apr_pstrdup(ctxt->c->pool, proxy_alpn),332 .size = strlen(proxy_alpn)333 };334 ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ctxt->c,335 "%s: proxy module requests ALPN proto '%s', "336 "length %" APR_SIZE_T_FMT ".",337 __func__, proxy_alpn, strlen(proxy_alpn));338 int ret = gnutls_alpn_set_protocols(ctxt->session,339 &alpn_proto,340 1 /* number of proposals */,341 0 /* flags */);342 if (ret != GNUTLS_E_SUCCESS)343 ap_log_cerror(APLOG_MARK, APLOG_ERR, ret, ctxt->c,344 "Could not set ALPN proposal '%s' for proxy "345 "connection: %s (%d)",346 proxy_alpn, gnutls_strerror(ret), ret);347 }325 if (proxy_alpn == NULL) 326 return; 327 328 // TODO: mod_ssl ssl_engine_io.c does some tokenization of 329 // the input string, so it looks like the API allows 330 // multiple protocols. 331 gnutls_datum_t alpn_proto = { 332 .data = (unsigned char *) apr_pstrdup(ctxt->c->pool, proxy_alpn), 333 .size = strlen(proxy_alpn) 334 }; 335 ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ctxt->c, 336 "%s: proxy module requests ALPN proto '%s', " 337 "length %" APR_SIZE_T_FMT ".", 338 __func__, proxy_alpn, strlen(proxy_alpn)); 339 int ret = gnutls_alpn_set_protocols(ctxt->session, 340 &alpn_proto, 341 1 /* number of proposals */, 342 0 /* flags */); 343 if (ret != GNUTLS_E_SUCCESS) 344 ap_log_cerror(APLOG_MARK, APLOG_ERR, ret, ctxt->c, 345 "Could not set ALPN proposal '%s' for proxy " 346 "connection: %s (%d)", 347 proxy_alpn, gnutls_strerror(ret), ret); 348 348 } 349 349
Note: See TracChangeset
for help on using the changeset viewer.