quic_tls_negotiation (quic v3.0.0)
View SourceSummary
Functions
Convert an internal cipher atom to its TLS cipher suite code.
Convert a TLS cipher suite code to its internal atom.
Extract the client's key_share public key for a given group atom.
Named-group wire code to atom. An unknown code stays an integer.
Server: the first offered external PSK PskConfig knows, each identity looked up once.
Server: pick the first server protocol the client also offered.
Server: select a cipher suite from the client's list.
Server: as select_cipher/2, preferring a suite of the PSK's Hash (RFC 9846 §4.3.11).
Decide the key-exchange group for a ClientHello (RFC 9846 §4.2.4).
Functions
Convert an internal cipher atom to its TLS cipher suite code.
Used when building ServerHello to send the correct suite to the client.
Convert a TLS cipher suite code to its internal atom.
Extract the client's key_share public key for a given group atom.
Named-group wire code to atom. An unknown code stays an integer.
-spec known_external_psk(map(), map() | undefined) -> {ok, #{identity_idx := non_neg_integer(), identity := binary(), secret := binary()}} | none.
Server: the first offered external PSK PskConfig knows, each identity looked up once.
Server: pick the first server protocol the client also offered.
Server: select a cipher suite from the client's list.
ClientCipherSuites is a list of TLS cipher suite codes (integers), converted to atoms for internal use. The server's own order decides, so a deployment that must not negotiate a particular suite can say so; without this the preference was fixed in code and a ciphers option had nowhere to take effect. none when the two lists share no suite.
Server: as select_cipher/2, preferring a suite of the PSK's Hash (RFC 9846 §4.3.11).