Certificate factory implementation