Hostname was not set and correction in certificate.js

Jira Issue: WP-528
Merge pull request #428 from habibvirji/WP-528-Refactor-PZH

Hostname was not set and correction in certificate.js