Changeset a72dc2b
- Timestamp:
- 2011-12-19T17:57:20Z (13 years ago)
- Branches:
- master
- Children:
- 9f958f7
- Parents:
- 25b05b7
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/http_client.c
r25b05b7 ra72dc2b 47 47 if( ssl ) 48 48 { 49 req->ssl = ssl_connect( host, port, http_ssl_connected, req );49 req->ssl = ssl_connect( host, port, TRUE, http_ssl_connected, req ); 50 50 if( req->ssl == NULL ) 51 51 error = 1; … … 163 163 164 164 error: 165 req->status_string = g_strdup( "Error while writing HTTP request" ); 165 if( req->status_string == NULL ) 166 req->status_string = g_strdup( "Error while writing HTTP request" ); 166 167 167 168 req->func( req ); … … 176 177 177 178 if( source == NULL ) 179 { 180 if( returncode != 0 ) 181 { 182 char *err = ssl_verify_strerror( returncode ); 183 req->status_string = g_strdup_printf( 184 "Certificate verification problem 0x%x: %s", 185 returncode, err ? err : "Unknown" ); 186 g_free( err ); 187 } 178 188 return http_connected( data, -1, cond ); 189 } 179 190 180 191 req->fd = ssl_getfd( source ); … … 440 451 if( new_proto == PROTO_HTTPS ) 441 452 { 442 req->ssl = ssl_connect( new_host, new_port, http_ssl_connected, req );453 req->ssl = ssl_connect( new_host, new_port, TRUE, http_ssl_connected, req ); 443 454 if( req->ssl == NULL ) 444 455 error = 1; -
lib/ssl_bogus.c
r25b05b7 ra72dc2b 32 32 } 33 33 34 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data )34 void *ssl_connect( char *host, int port, gboolean verify, ssl_input_function func, gpointer data ) 35 35 { 36 36 return( NULL ); -
lib/ssl_client.h
r25b05b7 ra72dc2b 64 64 ready to be used for SSL traffic. This is all done asynchronously, no 65 65 blocking I/O! (Except for the DNS lookups, for now...) */ 66 G_MODULE_EXPORT void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data );66 G_MODULE_EXPORT void *ssl_connect( char *host, int port, gboolean verify, ssl_input_function func, gpointer data ); 67 67 68 68 /* Start an SSL session on an existing fd. Useful for STARTTLS functionality, -
lib/ssl_gnutls.c
r25b05b7 ra72dc2b 78 78 } 79 79 80 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data )80 void *ssl_connect( char *host, int port, gboolean verify, ssl_input_function func, gpointer data ) 81 81 { 82 82 struct scd *conn = g_new0( struct scd, 1 ); … … 86 86 conn->data = data; 87 87 conn->inpa = -1; 88 conn->hostname = g_strdup( host ); 89 conn->verify = verify && global.conf->cafile; 88 90 89 91 if( conn->fd < 0 ) -
lib/ssl_nss.c
r25b05b7 ra72dc2b 103 103 } 104 104 105 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data )105 void *ssl_connect( char *host, int port, gboolean verify, ssl_input_function func, gpointer data ) 106 106 { 107 107 struct scd *conn = g_new0( struct scd, 1 ); -
lib/ssl_openssl.c
r25b05b7 ra72dc2b 65 65 } 66 66 67 void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data )67 void *ssl_connect( char *host, int port, gboolean verify, ssl_input_function func, gpointer data ) 68 68 { 69 69 struct scd *conn = g_new0( struct scd, 1 ); -
protocols/jabber/jabber.c
r25b05b7 ra72dc2b 236 236 if( set_getbool( &acc->set, "ssl" ) ) 237 237 { 238 jd->ssl = ssl_connect( connect_to, set_getint( &acc->set, "port" ), jabber_connected_ssl, ic );238 jd->ssl = ssl_connect( connect_to, set_getint( &acc->set, "port" ), FALSE, jabber_connected_ssl, ic ); 239 239 jd->fd = jd->ssl ? ssl_getfd( jd->ssl ) : -1; 240 240 } -
protocols/skype/skype.c
r25b05b7 ra72dc2b 1185 1185 imcb_log(ic, "Connecting"); 1186 1186 sd->ssl = ssl_connect(set_getstr(&acc->set, "server"), 1187 set_getint(&acc->set, "port"), skype_connected, ic);1187 set_getint(&acc->set, "port"), FALSE, skype_connected, ic); 1188 1188 sd->fd = sd->ssl ? ssl_getfd(sd->ssl) : -1; 1189 1189 sd->username = g_strdup(acc->user);
Note: See TracChangeset
for help on using the changeset viewer.