Commit 3d18c79d authored by Simon Morlat's avatar Simon Morlat
Browse files

don't check canonical names if they are not known.

parent 1341e903
......@@ -56,7 +56,7 @@ static belle_sip_list_t * for_each_weak_unref_free(belle_sip_list_t *l, belle_si
static void belle_sip_channel_destroy(belle_sip_channel_t *obj){
if (obj->peer_list) freeaddrinfo(obj->peer_list);
belle_sip_free(obj->peer_cname);
if (obj->peer_cname) belle_sip_free(obj->peer_cname);
belle_sip_free(obj->peer_name);
if (obj->local_ip) belle_sip_free(obj->local_ip);
obj->listeners=for_each_weak_unref_free(obj->listeners,(belle_sip_object_destroy_notify_t)belle_sip_channel_remove_listener,obj);
......@@ -285,7 +285,7 @@ static void update_inactivity_timer(belle_sip_channel_t *obj, int from_recv){
}
void belle_sip_channel_init(belle_sip_channel_t *obj, belle_sip_stack_t *stack,const char *bindip,int localport,const char *peer_cname, const char *peername, int peer_port){
obj->peer_cname=peer_cname ? belle_sip_strdup(peer_cname) : belle_sip_strdup(peername);
obj->peer_cname=peer_cname ? belle_sip_strdup(peer_cname) : NULL;
obj->peer_name=belle_sip_strdup(peername);
obj->peer_port=peer_port;
obj->stack=stack;
......
......@@ -290,7 +290,7 @@ belle_sip_channel_t * belle_sip_channel_new_tls(belle_sip_tls_listening_point_t
ssl_set_authmode(&obj->sslctx,SSL_VERIFY_REQUIRED);
ssl_set_bio(&obj->sslctx,polarssl_read,obj,polarssl_write,obj);
if (lp->root_ca && belle_sip_tls_channel_load_root_ca(obj,lp->root_ca)==0){
ssl_set_ca_chain(&obj->sslctx,&obj->root_ca,NULL,super->base.peer_cname);
ssl_set_ca_chain(&obj->sslctx,&obj->root_ca,NULL,super->base.peer_cname ? super->base.peer_cname : super->base.peer_name );
}
ssl_set_rng(&obj->sslctx,random_generator,NULL);
ssl_set_verify(&obj->sslctx,belle_sip_ssl_verify,lp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment