brokenhttpd/src/ssl-bozo.c
/*
 * returns non-zero for failure
 */
returns non-zero for failure
returns non - zero for failure
int
bozo_ssl_accept(bozohttpd_t *httpd)
{
	sslinfo_t *sslinfo = httpd->sslinfo;
	if (sslinfo == NULL || !sslinfo->ssl_context)
		return 0;
	sslinfo->bozossl = SSL_new(sslinfo->ssl_context);
	if (sslinfo->bozossl == NULL)
		bozoerr(httpd, 1, "SSL_new failed");
	SSL_set_rfd(sslinfo->bozossl, 0);
	SSL_set_wfd(sslinfo->bozossl, 1);
	const int ret = SSL_accept(sslinfo->bozossl);
	bozo_check_error_queue(httpd, "accept", ret);
	return ret != 1;
}
int bozo_ssl_accept ( bozohttpd_t * httpd ) { sslinfo_t * sslinfo = httpd -> sslinfo ; if ( sslinfo == NULL || ! sslinfo -> ssl_context ) return 0 ; sslinfo -> bozossl = SSL_new ( sslinfo -> ssl_context ) ; if ( sslinfo -> bozossl == NULL ) bozoerr ( httpd , 1 , " " ) ; SSL_set_rfd ( sslinfo -> bozossl , 0 ) ; SSL_set_wfd ( sslinfo -> bozossl , 1 ) ; const int ret = SSL_accept ( sslinfo -> bozossl ) ; bozo_check_error_queue ( httpd , " " , ret ) ; return ret != 1 ; }
returns non-zero for failure
returns non - zero for failure