Note: to run this sample on Safari, developers need to replace the certificate referenced in the code with a proper certificate.