helper for creating crypto credentials based on cert files.