YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.fcast.protocol.FCastTls Class Reference

The in-place TLS 1.3 upgrade of a v4 connection (docs/tech.md, "FCast v4"; decision D25): the sender is the TLS client, only TLS 1.3 is allowed, and the only certificate that is trusted is the one whose key has the pinned hash. More...

Collaboration diagram for de.yaacc.fcast.protocol.FCastTls:
Collaboration graph

Classes

class  PinMismatch
 Names the pin as the reason a handshake failed.
 
class  PinTrustManager
 Trusts one key and nothing else.
 

Static Public Member Functions

static SSLSocket upgrade (Socket plain, String host, int port, FCastPin pin, int timeoutMillis) throws IOException
 Wraps the connected socket in TLS 1.3 and runs the handshake.
 

Detailed Description

The in-place TLS 1.3 upgrade of a v4 connection (docs/tech.md, "FCast v4"; decision D25): the sender is the TLS client, only TLS 1.3 is allowed, and the only certificate that is trusted is the one whose key has the pinned hash.

The dates and the host name of the certificate are not checked (the receiver makes a self-signed certificate; its key is its identity); the TLS stack still verifies the handshake signature with that key, which proves that the peer holds the key.

Member Function Documentation

◆ upgrade()

static SSLSocket de.yaacc.fcast.protocol.FCastTls.upgrade ( Socket plain,
String host,
int port,
FCastPin pin,
int timeoutMillis ) throws IOException
static

Wraps the connected socket in TLS 1.3 and runs the handshake.

The plain socket must not have been read past the receiver's Version packet (the frame reader reads exactly the bytes of a frame). On any failure the socket is closed.

Parameters
timeoutMillisthe longest the handshake may take
Returns
the TLS socket (the plain one is closed with it)
Exceptions
FCastSecurityExceptionPIN_MISMATCH, HANDSHAKE_FAILED or TLS_UNSUPPORTED

The documentation for this class was generated from the following file: