Renamed utils file
This commit is contained in:
@ -1542,7 +1542,7 @@ private fun initAccountFromConfig(acc: Account, onConfigLoaded: () -> Unit) {
|
|||||||
val caFile = File(BaresipService.filesPath + "/ca_certs.crt")
|
val caFile = File(BaresipService.filesPath + "/ca_certs.crt")
|
||||||
val config = try {
|
val config = try {
|
||||||
if (caFile.exists())
|
if (caFile.exists())
|
||||||
Utils.readUrlWithCustomCas(URL(url), caFile)
|
Utils.readUrlWithCustomCAs(URL(url), caFile)
|
||||||
else
|
else
|
||||||
URL(url).readText()
|
URL(url).readText()
|
||||||
} catch (e: java.lang.Exception) {
|
} catch (e: java.lang.Exception) {
|
||||||
|
|||||||
@ -1006,7 +1006,7 @@ object Utils {
|
|||||||
Api.AAudio_close_stream()
|
Api.AAudio_close_stream()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun readUrlWithCustomCas(url: URL, caFile: File): String? {
|
fun readUrlWithCustomCAs(url: URL, caFile: File): String? {
|
||||||
if (!caFile.exists()) {
|
if (!caFile.exists()) {
|
||||||
Log.d("Utils", "Custom CA file not found at ${caFile.path}")
|
Log.d("Utils", "Custom CA file not found at ${caFile.path}")
|
||||||
return null
|
return null
|
||||||
|
|||||||
Reference in New Issue
Block a user