diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c
index 5ef7c03..d0823b8 100644
--- a/smime/gui/certificate-manager.c
+++ b/smime/gui/certificate-manager.c
@@ -1097,13 +1097,18 @@ certificate_manager_config_new (EPreferencesWindow *window)
 	GtkWidget *parent;
 	GtkWidget *widget;
 	CertificateManagerData *cfm_data;
+	PK11SlotInfo* slot;
+	ECertDB *cert_db;
 
 	shell = e_preferences_window_get_shell (window);
 
 	g_return_val_if_fail (E_IS_SHELL (shell), NULL);
 
 	/* We need to peek the db here to make sure it (and NSS) are fully initialized. */
-	e_cert_db_peek ();
+
+	cert_db = e_cert_db_peek();
+	slot = PK11_GetInternalKeySlot();
+	e_cert_db_login_to_slot(cert_db, slot);
 
 	cfm_data = g_new0 (CertificateManagerData, 1);
 
