private bool tls_cert_exist_check()
{
String base_dir = FieldValue.GetByName(values, "tls-cert-dir").value;
if (String.IsNullOrWhiteSpace(base_dir))
base_dir = "conf/ssl";
//this is what freeswitch uses by default if its empty, if this changes this code needs to be updated
base_dir = base_dir.Replace('/', '\\'); //windows file path
if (base_dir[base_dir.Length - 1] != '\\')
base_dir += '\\';
if (!System.IO.File.Exists(base_dir + "cafile.pem")) {
MessageBox.Show("Your sofia settings have TLS enabled however you do not have a cafile.pem in your cert folder, this will most likely cause the entire softphone profile not to load so I am disabling TLS in the profile for now");
return false;
}
return true;
}