Creating certificate factory class