title: iOS certificate pinning with Swift and NSURLSession
body: <p>Howto add certificate pinning to a NSURLSession in Swift?</p>
  
  <p>The <a href="https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning#iOS" rel="noreferrer">OWASP website</a> contains only an example for Objective-C and NSURLConnection.</p>