Post

Replies

Boosts

Views

Activity

Reply to certificate validation in SwiftUI App fails
MacOS 15.0 I've also tried the openldap config settings to disable cert validation and to provide a specific CA cert file. Neither seems to have any effect. The openldap library is statically linked into my app. Below is a code fragment of the init function. public init(url:String = "ldaps://localhost", loginData: Login? = nil, codePage: Iconv.CodePage = .UTF8) throws { if codePage != .UTF8 { // we need a pair of code pages to transit in both directions. iconv = try Iconv(from: codePage, to: .UTF8) iconvR = try Iconv(from: .UTF8, to: codePage) }//end if ldap = OpaquePointer(bitPattern: 0) //var certOption = LDAP_OPT_X_TLS_NEVER // var certOption: Int32 = LDAP_OPT_X_TLS_NEVER // // var r = ldap_set_option(ldap, LDAP_OPT_X_TLS_REQUIRE_CERT,&certOption) // guard r == LDAP_SUCCESS else { // throw Exception.message("TLS NEVER: "+LDAP.error(r)) // } var certFile: String = "/etc/lbCerts/igTreeCA.pem" var r = ldap_set_option(ldap, LDAP_OPT_X_TLS_CACERTFILE, certFile) guard r == LDAP_SUCCESS else { throw Exception.message("TLS CERTFILE: "+LDAP.error(r)) } r = ldap_initialize(&ldap, url)
2w