Certificate factory implementation (early stage)