Fix certificate encoding selection for --certform and --keyform