Windows XP
對 Server Name Indication 的支持很差。表現爲打不開某些 https 網頁。請單擊工具菜單,而後單擊 Internet 選項。在「高級」選項卡上,滾動到「安全」部分,複選 SSL 2.0、SSL 3.0、TLS 1.0、PCT 1.0 設置。nginx
Nginx
爲例,測試https
證書與IE6
的兼容性apt-get -y install nginx # yum -y install nginx
SNI
容許一個IP
指向多個證書,那麼咱們作兩個域名使用兩個證書。簡要以下:openssl genrsa -des3 -out /etc/nginx/conf.d/s1.key 1024 openssl genrsa -des3 -out /etc/nginx/conf.d/s2.key 1024 openssl req -new -key /etc/nginx/conf.d/s1.key -out /etc/nginx/conf.d/s1.csr openssl req -new -key /etc/nginx/conf.d/s2.key -out /etc/nginx/conf.d/s2.csr openssl rsa -in /etc/nginx/conf.d/s1.key -out /etc/nginx/conf.d/s1-nopwd.key openssl rsa -in /etc/nginx/conf.d/s2.key -out /etc/nginx/conf.d/s2-nopwd.key openssl x509 -req -days 365 -in /etc/nginx/conf.d/s1.csr -signkey /etc/nginx/conf.d/s1-nopwd.key -out /etc/nginx/conf.d/s1.crt openssl x509 -req -days 365 -in /etc/nginx/conf.d/s2.csr -signkey /etc/nginx/conf.d/s2-nopwd.key -out /etc/nginx/conf.d/s2.crt
Nginx.conf
片斷https
的關鍵配置段:server { listen 443 ssl; server_name s1.higkoo.com; ssl_certificate conf.d/s1.crt; ssl_certificate_key conf.d/s1-nopwd.key; charset utf-8; location / { add_header id 's1'; stub_status on; access_log off; } } server { listen 443 ssl; server_name s2.higkoo.com; ssl_certificate conf.d/s2.crt; ssl_certificate_key conf.d/s2-nopwd.key; ssl_session_timeout 30m; ssl_protocols TLSv1.2 TLSv1.1 TLSv1 SSLv3; # protocols、ciphers 參考 google、baidu,兼顧 安全和兼容性。 ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:RSA+AES:TLS_RSA_WITH_3DES_EDE_CBC_SHA:TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA:RC4-SHA:ECDHE-RSA-RC4-SHA; ssl_session_cache shared:SSL:50m; ssl_prefer_server_ciphers off; charset utf-8; location / { add_header id 's2'; stub_status on; access_log off; } }
Windows XP
下其它瀏覽器是否能正確處理呢?curl
對sni
也是默認支持的,跳過證書的校驗:lynx
,和IE6同樣拿到的是第1個證書。因此打開第2個網站時會提示證書錯誤,手動確認後可正常打開: