Added ability to set certificate