• B
    Restore historical SSL_get_servername() behavior · 2c0267fd
    Ben Kaduk 提交于
    Commit 1c4aa31d modified the state machine
    to clean up stale ext.hostname values from SSL objects in the case when
    SNI was not negotiated for the current handshake.  This is natural from
    the TLS perspective, since this information is an extension that the client
    offered but we ignored, and since we ignored it we do not need to keep it
    around for anything else.
    
    However, as documented in https://github.com/openssl/openssl/issues/7014 ,
    there appear to be some deployed code that relies on retrieving such an
    ignored SNI value from the client, after the handshake has completed.
    Because the 1.1.1 release is on a stable branch and should preserve the
    published ABI, restore the historical behavior by retaining the ext.hostname
    value sent by the client, in the SSL structure, for subsequent retrieval.
    
    [extended tests]
    Reviewed-by: NMatt Caswell <matt@openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/7115)
    2c0267fd
extensions.c 58.9 KB