switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR,"Error: Could not build a SSL session to: %s error=%d\n",msrp_session->remote_path,SSL_get_error(ssl,ret));
gotoend;
}
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_INFO,"Successfully enabled SSL/TLS session to: %s\n",msrp_session->remote_path);
cert=SSL_get_peer_certificate(ssl);
if(cert==NULL){
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR,"Error: Could not get a certificate from: %s\n",msrp_session->remote_path);
}else{
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_INFO,"Got SSL Cert from %s\n",msrp_session->remote_path);