secure-transport

Why is my server's wildcard SSL certificate being rejected?

隐身守侯 提交于 2019-12-05 01:00:52
问题 I am using an NSURLConnection to connect to a server with a wildcard TLS certificate (like "*.domain.com"), and when I call SecTrustEvaluate in my NSURLConnectionDelegate 's -connection:willSendRequestForAuthenticationChallenge: method, the certificate is rejected as invalid. Another server that has a fully-specified TLS certificate (like "server2.domain.com") is accepted. Both certificates are issued by the same CA, and I have added the CA certificate to my device's trusted certificate list.

How should Secure Transport TLS be used with BSD sockets in Swift?

倖福魔咒の 提交于 2019-12-01 10:36:42
问题 I'm trying to use Secure Transport with BSD sockets using Swift. It seems like it should be simple enough, but I can't get it to work and documentation on the subject is scarce. I've boiled my issue down to a simple "Socket" class, where I've (to the best of my knowledge) fulfilled the requirements of Secure Transport. import Cocoa class Socket: NSObject { private let hello = "Hello!" private var socketfd: Int32 private var sock_addr: sockaddr private var sslContext: SSLContext? var