=== modified file 'calendar/libecal/e-cal-util.h'
--- calendar/libecal/e-cal-util.h	2007-12-18 16:36:30 +0000
+++ calendar/libecal/e-cal-util.h	2007-12-18 19:02:28 +0000
@@ -127,6 +127,7 @@
 #define CAL_STATIC_CAPABILITY_NO_ORGANIZER		 "no-organizer"
 #define CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY		 "delegate-to-many"
 #define CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING     "has-unaccepted-meeting"
+#define CAL_STATIC_CAPABILITY_HAS_SMART_CARD     "smart-card"
 
 /* Recurrent events. Management for instances */
 icalcomponent *e_cal_util_construct_instance (icalcomponent *icalcomp,

=== modified file 'calendar/libecal/e-cal.c'
--- calendar/libecal/e-cal.c	2007-12-18 18:57:46 +0000
+++ calendar/libecal/e-cal.c	2007-12-18 19:02:28 +0000
@@ -1631,12 +1631,15 @@
 	ECalendarOp *our_op;
 	char *username = NULL, *auth_type = NULL, *password = NULL;
 	gboolean read_only = FALSE;
+	gboolean no_auth;
 
 	e_return_error_if_fail (ecal != NULL, E_CALENDAR_STATUS_INVALID_ARG);
 	e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
 
 	priv = ecal->priv;
-
+	
+	no_auth = e_cal_get_static_capability (ecal, CAL_STATIC_CAPABILITY_HAS_SMART_CARD);
+	
 	g_mutex_lock (ecal->priv->mutex);
 
 	if (!needs_auth && priv->load_state == E_CAL_LOAD_LOADED) {
@@ -1655,7 +1658,7 @@
 	g_mutex_unlock (priv->mutex);
 
 	/* see if the backend needs authentication */
-	if ( (priv->mode !=  CAL_MODE_LOCAL) && e_source_get_property (priv->source, "auth")) {
+	if (!no_auth && (priv->mode !=  CAL_MODE_LOCAL) && e_source_get_property (priv->source, "auth")) {
 		char *prompt, *key;
 		char *parent_user;
 
@@ -2419,11 +2422,6 @@
 
 	g_mutex_lock (ecal->priv->mutex);
 
-	if (ecal->priv->load_state != E_CAL_LOAD_LOADED) {
-		g_mutex_unlock (ecal->priv->mutex);
-		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
-	}
-
 	if (ecal->priv->current_op != NULL) {
 		g_mutex_unlock (ecal->priv->mutex);
 		E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_BUSY, error);

=== modified file 'servers/exchange/storage/exchange-account.c'
--- servers/exchange/storage/exchange-account.c	2007-12-18 18:57:46 +0000
+++ servers/exchange/storage/exchange-account.c	2007-12-18 19:02:28 +0000
@@ -2500,3 +2500,11 @@
 	}
 	return NULL;
 }
+
+const char *
+exchange_account_get_password_key (ExchangeAccount *acct)
+{
+	g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (acct), NULL);
+	
+	return acct->priv->password_key;
+}

=== modified file 'servers/exchange/storage/exchange-account.h'
--- servers/exchange/storage/exchange-account.h	2007-12-18 18:57:46 +0000
+++ servers/exchange/storage/exchange-account.h	2007-12-18 19:02:28 +0000
@@ -202,7 +202,7 @@
 GtkListStore 	       *exchange_account_folder_size_get_model (ExchangeAccount *account);
 void 		  	exchange_account_scan_foreign_hierarchy (ExchangeAccount *account,
 							      const char *user_email);
-
+const char * 		exchange_account_get_password_key (ExchangeAccount *acct);
 
 #ifdef __cplusplus
 }

