Changeset 2fb1262
- Timestamp:
- 2012-11-11T18:22:39Z (12 years ago)
- Branches:
- master
- Children:
- dd672e2
- Parents:
- 1388d30
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/ssl_gnutls.c
r1388d30 r2fb1262 38 38 39 39 static gboolean initialized = FALSE; 40 gnutls_certificate_credentials xcred;40 gnutls_certificate_credentials_t xcred; 41 41 42 42 #include <limits.h> … … 60 60 gboolean verify; 61 61 62 gnutls_session session;62 gnutls_session_t session; 63 63 }; 64 64 … … 132 132 conn->data = data; 133 133 conn->inpa = -1; 134 conn->hostname = hostname;134 conn->hostname = g_strdup( hostname ); 135 135 136 136 /* For now, SSL verification is globally enabled by setting the cafile … … 169 169 int verifyret = 0; 170 170 gnutls_x509_crt_t cert; 171 const char *hostname;172 173 hostname= gnutls_session_get_ptr( session );171 struct scd *conn; 172 173 conn = gnutls_session_get_ptr( session ); 174 174 175 175 gnutlsret = gnutls_certificate_verify_peers2( session, &status ); … … 209 209 return VERIFY_CERT_ERROR; 210 210 211 if( !gnutls_x509_crt_check_hostname( cert, hostname ) )211 if( !gnutls_x509_crt_check_hostname( cert, conn->hostname ) ) 212 212 { 213 213 verifyret |= VERIFY_CERT_INVALID; … … 265 265 266 266 gnutls_init( &conn->session, GNUTLS_CLIENT ); 267 if( conn->verify ) 268 gnutls_session_set_ptr( conn->session, (void *) conn->hostname ); 267 gnutls_session_set_ptr( conn->session, (void *) conn ); 269 268 #if GNUTLS_VERSION_NUMBER < 0x020c00 270 269 gnutls_transport_set_lowat( conn->session, 0 ); … … 274 273 275 274 sock_make_nonblocking( conn->fd ); 276 gnutls_transport_set_ptr( conn->session, (gnutls_transport_ptr ) GNUTLS_STUPID_CAST conn->fd );275 gnutls_transport_set_ptr( conn->session, (gnutls_transport_ptr_t) GNUTLS_STUPID_CAST conn->fd ); 277 276 278 277 return ssl_handshake( data, source, cond ); … … 400 399 if( conn->session ) 401 400 gnutls_deinit( conn->session ); 401 g_free( conn->hostname ); 402 402 g_free( conn ); 403 403 } -
protocols/twitter/twitter_lib.c
r1388d30 r2fb1262 958 958 959 959 g_free(args[1]); 960 if (td->timeline_id) { 961 g_free(args[5]); 962 } 960 g_free(args[5]); 963 961 } 964 962 … … 986 984 goto end; 987 985 twitter_xt_get_status_list(ic, parsed, txl); 988 //json_value_free(parsed);986 json_value_free(parsed); 989 987 990 988 td->home_timeline_obj = txl; … … 1022 1020 goto end; 1023 1021 twitter_xt_get_status_list(ic, parsed, txl); 1024 //json_value_free(parsed);1022 json_value_free(parsed); 1025 1023 1026 1024 td->mentions_obj = txl;
Note: See TracChangeset
for help on using the changeset viewer.