Changeset def3650
- Timestamp:
- 2012-12-24T13:28:02Z (12 years ago)
- Branches:
- master
- Children:
- 9b67285
- Parents:
- 3f661849
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/ssl_openssl.c
r3f661849 rdef3650 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 04Wilmer van der Gaast and others *4 * Copyright 2002-2012 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 52 52 int lasterr; /* Necessary for SSL_get_error */ 53 53 SSL *ssl; 54 SSL_CTX *ssl_ctx;55 54 }; 55 56 static SSL_CTX *ssl_ctx; 56 57 57 58 static void ssl_conn_free( struct scd *conn ); … … 63 64 void ssl_init( void ) 64 65 { 66 const SSL_METHOD *meth; 67 68 SSL_library_init(); 69 70 meth = TLSv1_client_method(); 71 ssl_ctx = SSL_CTX_new( meth ); 72 65 73 initialized = TRUE; 66 SSL_library_init();67 // SSLeay_add_ssl_algorithms();68 74 } 69 75 … … 122 128 { 123 129 struct scd *conn = data; 124 const SSL_METHOD *meth;125 130 126 131 if( conn->verify ) … … 142 147 } 143 148 144 meth = TLSv1_client_method(); 145 conn->ssl_ctx = SSL_CTX_new( meth ); 146 if( conn->ssl_ctx == NULL ) 149 150 if( ssl_ctx == NULL ) 147 151 goto ssl_connected_failure; 148 152 149 conn->ssl = SSL_new( conn->ssl_ctx );153 conn->ssl = SSL_new( ssl_ctx ); 150 154 if( conn->ssl == NULL ) 151 155 goto ssl_connected_failure; … … 251 255 { 252 256 SSL_free( conn->ssl ); 253 SSL_CTX_free( conn->ssl_ctx );254 257 g_free( conn->hostname ); 255 258 g_free( conn );
Note: See TracChangeset
for help on using the changeset viewer.