Swift
Swift
Require that the Web Server's SSL Certificate is Non-Expired and the Signature is Valid
Demonstrates setting the RequireSslCertVerify property to require that the web server's SSL/TLS certificate is non-expired and that the certificate's signature is valid.Chilkat Swift Downloads
func chilkatTest() {
// This example assumes the Chilkat HTTP API to have been previously unlocked.
// See Global Unlock Sample for sample code.
var url: String? = "https://chilkatsoft.com"
let http = CkoHttp()!
http.requireSslCertVerify = true
var html: String? = http.quickGetStr(url: url)
if http.lastMethodSuccess != true {
print("\(http.lastErrorText!)")
return
}
print("Success.")
}