mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-10-30 19:20:40 -04:00 
			
		
		
		
	Quit using deprecated ssl_set_bio() in programs
This commit is contained in:
		
							parent
							
								
									9a65e80e4f
								
							
						
					
					
						commit
						aeab252fef
					
				| @ -234,7 +234,7 @@ int main( void ) | ||||
|         goto exit; | ||||
|     } | ||||
| 
 | ||||
|     ssl_set_bio( &ssl, net_recv, &server_fd, net_send, &server_fd ); | ||||
|     ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv, NULL, 0 ); | ||||
| 
 | ||||
|     if( ssl_handshake( &ssl ) != 0 ) | ||||
|     { | ||||
|  | ||||
| @ -176,8 +176,7 @@ int main( void ) | ||||
| 
 | ||||
|     ssl_set_rng( &ssl, ctr_drbg_random, &ctr_drbg ); | ||||
|     ssl_set_dbg( &ssl, my_debug, stdout ); | ||||
|     ssl_set_bio( &ssl, net_recv, &server_fd, | ||||
|                        net_send, &server_fd ); | ||||
|     ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv, NULL, 0 ); | ||||
| 
 | ||||
|     /*
 | ||||
|      * 4. Handshake | ||||
|  | ||||
| @ -276,8 +276,7 @@ int main( void ) | ||||
| 
 | ||||
|         ssl_set_rng( &ssl, ctr_drbg_random, &ctr_drbg ); | ||||
|         ssl_set_dbg( &ssl, my_debug, stdout ); | ||||
|         ssl_set_bio( &ssl, net_recv, &client_fd, | ||||
|                            net_send, &client_fd ); | ||||
|         ssl_set_bio_timeout( &ssl, &client_fd, net_send, net_recv, NULL, 0 ); | ||||
| 
 | ||||
|         ssl_set_ca_chain( &ssl, srvcert.next, NULL, NULL ); | ||||
|         if( ( ret = ssl_set_own_cert( &ssl, &srvcert, &pkey ) ) != 0 ) | ||||
|  | ||||
| @ -613,8 +613,7 @@ int main( int argc, char *argv[] ) | ||||
| 
 | ||||
|     ssl_set_rng( &ssl, ctr_drbg_random, &ctr_drbg ); | ||||
|     ssl_set_dbg( &ssl, my_debug, stdout ); | ||||
|     ssl_set_bio( &ssl, net_recv, &server_fd, | ||||
|             net_send, &server_fd ); | ||||
|     ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv, NULL, 0 ); | ||||
| 
 | ||||
|     if( opt.force_ciphersuite[0] != DFL_FORCE_CIPHER ) | ||||
|         ssl_set_ciphersuites( &ssl, opt.force_ciphersuite ); | ||||
|  | ||||
| @ -197,8 +197,7 @@ static void *handle_ssl_connection( void *data ) | ||||
| 
 | ||||
|     polarssl_printf( "  [ #%d ]  ok\n", thread_id ); | ||||
| 
 | ||||
|     ssl_set_bio( &ssl, net_recv, &client_fd, | ||||
|                        net_send, &client_fd ); | ||||
|         ssl_set_bio_timeout( &ssl, &client_fd, net_send, net_recv, NULL, 0 ); | ||||
| 
 | ||||
|     polarssl_printf( "  [ #%d ]  ok\n", thread_id ); | ||||
| 
 | ||||
|  | ||||
| @ -251,8 +251,7 @@ reset: | ||||
|         goto exit; | ||||
|     } | ||||
| 
 | ||||
|     ssl_set_bio( &ssl, net_recv, &client_fd, | ||||
|                        net_send, &client_fd ); | ||||
|         ssl_set_bio_timeout( &ssl, &client_fd, net_send, net_recv, NULL, 0 ); | ||||
| 
 | ||||
|     polarssl_printf( " ok\n" ); | ||||
| 
 | ||||
|  | ||||
| @ -439,8 +439,7 @@ int main( int argc, char *argv[] ) | ||||
| 
 | ||||
|         ssl_set_rng( &ssl, ctr_drbg_random, &ctr_drbg ); | ||||
|         ssl_set_dbg( &ssl, my_debug, stdout ); | ||||
|         ssl_set_bio( &ssl, net_recv, &server_fd, | ||||
|                 net_send, &server_fd ); | ||||
|         ssl_set_bio_timeout( &ssl, &server_fd, net_send, net_recv, NULL, 0 ); | ||||
| 
 | ||||
|         if( ( ret = ssl_set_own_cert( &ssl, &clicert, &pkey ) ) != 0 ) | ||||
|         { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Manuel Pégourié-Gonnard
						Manuel Pégourié-Gonnard