Which of the following statements are true regarding Server Name Indication (SNI)? (Choose two.)



A. It supports transparent failover of TLS sessions from one web server to another.
B. It allows multiple SSL/TLS secured virtual HTTP hosts to coexist on the same IP address.
C. It enables HTTP servers to update the DNS of their virtual hosts' names using the X 509 certificates of the virtual hosts.
D. It provides a list of available virtual hosts to the client during the TLS handshake.
E. It submits the host name of the requested URL during the TLS handshake.

題解

先來談談一台Web伺服器是如何在同一個IP的連接埠上綁上不同的網域,並針對不同網域提供不一樣的網站內容。這個其實要歸功於HTTP標頭中的「Host」欄位,當客戶端在向伺服器端要求網站資源時,通常會在HTTP標頭中自動加上「Host」欄位,這個欄位的內容即存取的URL的網域名稱。於是當Web伺服器收到來自於客戶端的請求後,就會依照客戶端的HTTP請求之標頭中的「Host」欄位,來選定要提供哪個網站的內容,這個功能稱為「虛擬主機」(Virtual Hosting),不要記成虛擬機器(Virtual Machine)囉!。

HTTPS需要使用SSL憑證來建立SSL/TLS連線,在早期,一個IP位址只能對應一個SSL憑證,因為在SSL/TLS成功建立連線前,會先確認SSL憑證的合法性,若想替不同的虛擬主機使用不同的SSL憑證,是無法達成的,因為在SSL/TLS成功建立連線前,Web伺服器無法得知客戶端到底是想存取哪個虛擬主機。於是乎,就變成所有在同一個IP下的網站都得使用同一個SSL憑證。

為了解決這個問題,SNI(Server Name Indication)便誕生了。SNI會在建立TLS連線前(也就是握手時),客戶端就先將想要存取的虛擬主機名稱明碼傳給Web伺服器,讓Web伺服器知道要使用哪個虛擬主機所設定的SSL憑證。

所以這題答案是選項「B」和選項「E」。