2011-12-15

Tcl TLS + Nginx SSL

使用 tcl http + tls 從 nginx 取得資料。根據之前的經驗
package require http
package require tls
http::register https 443 ::tls::socket
set tok [::http::geturl "https://192.168.72.77/index.html"]
結果出現錯誤...
error reading "sock580": software caused connection abort
SSL channel "sock580": error: tls invalid ecpointformat list
用 tls 試看看,出現相同的錯誤...
set sck [tls::socket 192.168.72.77 443]
tls::handshake $sck
看起來在 handshake 就掛了,google 不到相關資料。奇怪的是 http server 改成 apache 後就沒問題,害我一開始花不少時間研究 nginx 的 ssl 設定。最後的解決方法有:
1. tls enable tls1 
http::register https 443 [list ::tls::socket -tls1 1]
set tok [::http::geturl "https://192.168.72.77/index.html"]
2. 別用 tls 1.6.1 (怒),另一台電腦上用的是 tls 1.6 就沒問題

沒有留言:

張貼留言