---
title: errSSLHostNameMismatch
framework: security
role: symbol
role_heading: Global Variable
path: security/errsslhostnamemismatch
---

# errSSLHostNameMismatch

The host name you connected with does not match any of the host names allowed by the certificate.

## Declaration

```swift
var errSSLHostNameMismatch: OSStatus { get }
```

## Discussion

Discussion This is commonly caused by an incorrect value for the kCFStreamSSLPeerName property within the dictionary associated with the stream’s kCFStreamPropertySSLSettings key.
