Skip to content
  • Ross Lagerwall's avatar
    tls: Add support for copying session data · 95d300ea
    Ross Lagerwall authored
    Add support for copying session data between client connections.
    This is needed for implementing FTP over SSL. Most servers use a separate
    session for each control connection and enforce sharing of each control
    connection's session between the related data connection.
    
    Copying session data between two connections is needed for two reasons:
    1) The data connection runs on a separate port and so has a different
    server_identity which means it would not normally share the session with
    the control connection using the session caching currently implemented.
    2) It is typical to have multiple control connections, each of which
    uses a different session with the same server_identity, so only one of
    these sessions gets stored in the cache. If a data connection is opened,
    (ignoring the port issue) it may try and reuse the wrong control
    connection's session, and fail.
    
    This operation is conceptually the same as OpenSSL's SSL_copy_session_id
    operation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745255
    95d300ea