• Martin Thomson's avatar
    Bug 1683710 - Add a means to disable ALPN, r=bbeurdouche · f263c383
    Martin Thomson authored
    We've recently learned the value of ALPN and SNI when it comes to protecting
    against cross-protocol attacks.  However, some protocols don't have ALPN yet.
    For servers that terminate connections for those connections, validating that
    the client has not offered ALPN provides a way to protect against cross-protocol
    attacks.  If the cross-protocol attack uses a protocol that does include ALPN,
    being able to reject those connections safely reduces exposure.
    
    This modifies SSL_SetNextProtoNego() to accept a zero-length buffer as an
    argument.  Previously, this would have crashed.  Now it causes the server to
    reject a handshake if ALPN is offered by the client.
    
    It was always possible to implement this by passing a function that always
    returns SECFailure to SSL_SetNextProtoCallback(). This approach has the
    advantage that the server generates a no_application_protocol alert, which is
    not something that user-provided code can do.
    
    Differential Revision: https://phabricator.services.mozilla.com/D110887
    
    --HG--
    extra : moz-landing-system : lando
    f263c383
Name
Last commit
Last update
..
certdb_gtest Loading commit data...
certhigh_gtest Loading commit data...
common Loading commit data...
cryptohi_gtest Loading commit data...
der_gtest Loading commit data...
freebl_gtest Loading commit data...
google_test Loading commit data...
mozpkix_gtest Loading commit data...
nss_bogo_shim Loading commit data...
pk11_gtest Loading commit data...
pkcs11testmodule Loading commit data...
smime_gtest Loading commit data...
softoken_gtest Loading commit data...
ssl_gtest Loading commit data...
sysinit_gtest Loading commit data...
util_gtest Loading commit data...
.clang-format Loading commit data...
Makefile Loading commit data...
README Loading commit data...
__init__.py Loading commit data...
manifest.mn Loading commit data...