small refactoring in import_certificate_dialog