patch d280db07c18bbe0bee399bd33a23c813c6215823 Author: Enrique D. Bosch Date: Tue Dec 4 23:41:31 CET 2018 * Add support for SNI patch a960193b96b178a92741ceb58850f17b29629c95 Author: Enrique D. Bosch Date: Tue Dec 4 21:12:31 CET 2018 * Simplify parser of configuration file patch 3994fdd764ce973cd13650e4fd820083d9e8b2b5 Author: Enrique D. Bosch Date: Tue Dec 4 20:53:19 CET 2018 * Add title to password dialog diff -rN -u old-idlebiff/idlebiff new-idlebiff/idlebiff --- old-idlebiff/idlebiff 2024-11-23 02:54:38.532475707 +0100 +++ new-idlebiff/idlebiff 2024-11-23 02:54:38.532475707 +0100 @@ -145,6 +145,7 @@ if { !$conf(tls) } { set nv "\nWARNING: INSECURE CONNECTION" } toplevel .tl + wm title .tl {idlebiff: password} message .tl.msg -bg black -fg yellow -width 400 -justify center \ -text "${textbad}Enter password for\n$conf(user) at $conf(host)" pack .tl.msg -side top -fill both @@ -181,9 +182,8 @@ while {[ >= [ gets $cf lin ] 0 ]} \ { if {[ == [ string index [ string trim $lin ] 0 ] # ]} continue - set sep [ string first = $lin ] - set key [ string range $lin 0 [ - $sep 1 ] ] - set val [ string range $lin [ + $sep 1 ] end ] + set lconf [ split $lin = ] + set val [ join [ lassign $lconf key ] = ] set conf([ string trim $key]) [ string trim $val ] } } @@ -648,6 +648,8 @@ set tlsv [ package require tls ] if {[ >= $tlsv 1.6.4 ]} { set tls1x {-tls1.1 1 -tls1.2 1} } \ else { set tls1x {} } + if {[ info exists conf(sni) ]} { set sni "-servername $conf(sni)" } \ + else { set sni {} } set sock "::tls::socket -ssl2 0 -ssl3 0 -tls1 1 $tls1x \ -cafile \"$conf(tls_ca_file)\" \ -cadir \"$conf(tls_ca_dir)\" \ @@ -656,6 +658,7 @@ -request \"$conf(tls_validate_cert)\" \ -require \"$conf(tls_validate_cert)\" \ -cipher \"$conf(tls_ciphers)\" \ + $sni \ -command tls_cb" } \ else { set sock socket }