Hi Matt, first thank you very much for your kind answer.
I would like if possible some directions to help me understand what you're saying. The code I did is working just fine in watchOS 6.2.8 but failing with watchOS 7 latest beta 7 (with the error above, "An SSL error has occurred and a secure connection to the server cannot be made."). I just want to compare the fingerprint of the certificate I receive to the fingerprint (SHA256 hash) I have in my code. I'm using Alamofire, and this is the code I have in the sessionDidReceiveChallenge:
_sessionMgrDefault.delegate.sessionDidReceiveChallenge = { session, challenge in
		var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling
		var credential: URLCredential?
		if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
				let host = challenge.protectionSpace.host
				if let serverTrust = challenge.protectionSpace.serverTrust {
						disposition = URLSession.AuthChallengeDisposition.useCredential
						credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
						let fingerPrints = ["<<<CERTIFICATE SHA256 HASH>>>"]
						for index in 0..<SecTrustGetCertificateCount(serverTrust) {
								let cer = SecTrustGetCertificateAtIndex(serverTrust, index)
								if let certificate = SecTrustGetCertificateAtIndex(serverTrust, index) {
										let certData = certificate.data
										let certHashByteArray = certData.sha256()
										let certificateHexString = certHashByteArray.toHexString().lowercased()
										if fingerPrints.contains(certificateHexString) {
												return (disposition, credential)
										}
								}
						}
				}
		}
		disposition = .cancelAuthenticationChallenge
		return (disposition, credential)
}
Running an analysis on the site SSLabs.com it says that (the certificate is a wildcard "*.<domain>.com.br"):
Issuer Valid Certificadora Digital SSL OV CA 2018
Signature algorithm SHA256withRSA
Revocation status Good (not revoked)
DNS CAA No
Trusted No	 NOT TRUSTED (Why?)
NOTE: Someone made a comment on StackOverflow that to be compatible with the ATS requirements, "as soon as you are doing a https:// request, you must ensure, that you meet the ATS-requirements: a valid certificate installed on the server (without wildcard, exactly matching the server's domain name), server supports TLS 1.2 with forward secrecy."
Is this the problem on watchOS 7? The certificate has to be specific to the site and not have wildcard?
Thank you again very much for your kind answer. Best Regards.