belle_sip_listening_point_t * belle_sip_tls_listening_point_new(belle_sip_stack_t *s, const char *ipaddress, int port){
	belle_sip_tls_listening_point_t *lp=belle_sip_object_new(belle_sip_tls_listening_point_t);
#ifdef ENABLE_SERVER_SOCKETS
	belle_sip_stream_listening_point_init((belle_sip_stream_listening_point_t*)lp,s,ipaddress,port,on_new_connection);
#else
	belle_sip_stream_listening_point_init((belle_sip_stream_listening_point_t*)lp,s,ipaddress,port);
#endif /* ENABLE_SERVER_SOCKETS */

	lp->crypto_config=belle_tls_crypto_config_new();

	return BELLE_SIP_LISTENING_POINT(lp);
}
belle_sip_listening_point_t * belle_sip_stream_listening_point_new(belle_sip_stack_t *s, const char *ipaddress, int port){
	belle_sip_stream_listening_point_t *lp=belle_sip_object_new(belle_sip_stream_listening_point_t);
#ifdef ENABLE_SERVER_SOCKETS
	belle_sip_stream_listening_point_init(lp,s,ipaddress,port,on_new_connection);
	if (lp->server_sock==(belle_sip_socket_t)-1){
		belle_sip_object_unref(lp);
		return NULL;
	}
#else
	belle_sip_stream_listening_point_init(lp,s,ipaddress,port);
#endif /* ENABLE_SERVER_SOCKETS */
	return BELLE_SIP_LISTENING_POINT(lp);
}
belle_sip_listening_point_t * belle_sip_tls_listening_point_new(belle_sip_stack_t *s, const char *ipaddress, int port){
	belle_sip_tls_listening_point_t *lp=belle_sip_object_new(belle_sip_tls_listening_point_t);
	belle_sip_stream_listening_point_init((belle_sip_stream_listening_point_t*)lp,s,ipaddress,port,on_new_connection);
	
	lp->verify_exceptions=0;
	/*try to load "system" default root ca, wihtout warranty...*/
#ifdef __linux
	belle_sip_tls_listening_point_set_root_ca(lp,"/etc/ssl/certs");
#elif defined(__APPLE__)
	belle_sip_tls_listening_point_set_root_ca(lp,"/opt/local/share/curl/curl-ca-bundle.crt");
#endif
	return BELLE_SIP_LISTENING_POINT(lp);
}