Changeset e101506
- Timestamp:
- 2006-09-24T17:22:08Z (18 years ago)
- Branches:
- master
- Children:
- cfbb3a6
- Parents:
- 42127dc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/io.c
r42127dc re101506 247 247 struct jabber_data *jd = gc->proto_data; 248 248 struct xt_node *c, *reply; 249 249 int trytls; 250 251 trytls = g_strcasecmp( set_getstr( &gc->acc->set, "tls" ), "try" ) == 0; 250 252 c = xt_find_node( node->children, "starttls" ); 251 253 if( c && !jd->ssl ) … … 254 256 not in a secure connection already: */ 255 257 256 int try;257 258 try = g_strcasecmp( set_getstr( &gc->acc->set, "tls" ), "try" ) == 0;259 258 c = xt_find_node( c->children, "required" ); 260 259 260 if( c && ( !trytls && !set_getbool( &gc->acc->set, "tls" ) ) ) 261 { 262 hide_login_progress( gc, "Server requires TLS connections, but TLS is turned off for this account" ); 263 signoff( gc ); 264 265 return XT_ABORT; 266 } 267 261 268 /* Only run this if the tls setting is set to true or try: */ 262 if( ( try 269 if( ( trytls || set_getbool( &gc->acc->set, "tls" ) ) ) 263 270 { 264 271 reply = xt_new_node( "starttls", NULL, NULL ); … … 274 281 } 275 282 } 276 else 277 { 278 /* TODO: Abort if TLS is required by the user. */ 283 else if( !c && !jd->ssl ) 284 { 285 /* If the server does not advertise the STARTTLS feature and 286 we're not in a secure connection already: (Servers have a 287 habit of not advertising <starttls/> anymore when already 288 using SSL/TLS. */ 289 290 if( !trytls && set_getbool( &gc->acc->set, "tls" ) ) 291 { 292 hide_login_progress( gc, "TLS is turned on for this account, but is not supported by this server" ); 293 signoff( gc ); 294 295 return XT_ABORT; 296 } 279 297 } 280 298
Note: See TracChangeset
for help on using the changeset viewer.