Skip to content

Instantly share code, notes, and snippets.

@sgammon
Created January 23, 2019 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgammon/308ab6171c03135d43c1be2c3fc5aa22 to your computer and use it in GitHub Desktop.
Save sgammon/308ab6171c03135d43c1be2c3fc5aa22 to your computer and use it in GitHub Desktop.
Hotspot configuration
///
///
private func generateHotspotConfiguration() throws -> NEHotspotConfiguration {
let eap = NEHotspotEAPSettings()
eap.supportedEAPTypes = [21] /* TTLS (`21`) */
eap.ttlsInnerAuthenticationType = .eapttlsInnerAuthenticationMSCHAPv2
eap.isTLSClientCertificateRequired = true
eap.outerIdentity = "customer@vip.chalice.farm"
eap.password = "4zJmhhjj"
eap.preferredTLSVersion = ._1_0
eap.trustedServerNames = ["radius.meraki.com"]
eap.username = "customer@vip.chalice.farm"
eap.setIdentity(try loadVIPIdentity())
let hs20 = NEHotspotHS20Settings(
domainName: AppConfig.OnSite.Hotspot.domain,
roamingEnabled: AppConfig.OnSite.Hotspot.roaming)
return NEHotspotConfiguration(
hs20Settings: hs20,
eapSettings: eap)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment