• Filippo Valsorda's avatar
    crypto/tls: implement TLS 1.3 server handshake (base) · c21ba09b
    Filippo Valsorda authored
    Implement a basic TLS 1.3 server handshake, only enabled if explicitly
    requested with MaxVersion.
    
    This CL intentionally leaves for future CLs:
      - PSK modes and resumption
      - client authentication
      - compatibility mode ChangeCipherSpecs
      - early data skipping
      - post-handshake messages
      - downgrade protection
      - KeyLogWriter support
      - TLS_FALLBACK_SCSV processing
    
    It also leaves a few areas up for a wider refactor (maybe in Go 1.13):
      - the certificate selection logic can be significantly improved,
        including supporting and surfacing signature_algorithms_cert, but
        this isn't new in TLS 1.3 (see comment in processClientHello)
      - handshake_server_tls13.go can be dried up and broken into more
        meaningful, smaller functions, but it felt premature to do before
        PSK and client auth support
      - the monstrous ClientHello equality check in doHelloRetryRequest can
        get both cleaner and more complete with collaboration from the
        parsing layer, which can come at the same time as extension
        duplicates detection
    
    Updates #9671
    
    Change-Id: Id9db2b6ecc2eea21bf9b59b6d1d9c84a7435151c
    Reviewed-on: https://go-review.googlesource.com/c/147017
    Run-TryBot: Filippo Valsorda <filippo@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAdam Langley <agl@golang.org>
    c21ba09b
Name
Last commit
Last update
..
testdata Loading commit data...
alert.go Loading commit data...
auth.go Loading commit data...
auth_test.go Loading commit data...
cipher_suites.go Loading commit data...
common.go Loading commit data...
conn.go Loading commit data...
conn_test.go Loading commit data...
example_test.go Loading commit data...
generate_cert.go Loading commit data...
handshake_client.go Loading commit data...
handshake_client_test.go Loading commit data...
handshake_client_tls13.go Loading commit data...
handshake_messages.go Loading commit data...
handshake_messages_test.go Loading commit data...
handshake_server.go Loading commit data...
handshake_server_test.go Loading commit data...
handshake_server_tls13.go Loading commit data...
handshake_test.go Loading commit data...
key_agreement.go Loading commit data...
key_schedule.go Loading commit data...
key_schedule_test.go Loading commit data...
prf.go Loading commit data...
prf_test.go Loading commit data...
ticket.go Loading commit data...
tls.go Loading commit data...
tls_test.go Loading commit data...