[evolution-kolab/account-mgmt] Remove KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/account-mgmt] Remove KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN.
- Date: Tue, 3 Jul 2012 16:58:56 +0000 (UTC)
commit 26f0699583adf8b5931a4149b2f3e4bafe51400f
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Jul 3 11:07:51 2012 -0400
Remove KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN.
Use CamelKolabIMAPXSettings:pkcs11-pin instead.
src/libekolab/kolab-mail-imap-client.c | 10 +++-------
src/libekolab/kolab-settings-handler.c | 2 --
src/libekolab/kolab-settings-handler.h | 1 -
src/libekolab/kolab-util-backend.c | 18 ------------------
.../integration/libekolab/test-kolab-mail-access.c | 11 ++---------
5 files changed, 5 insertions(+), 37 deletions(-)
---
diff --git a/src/libekolab/kolab-mail-imap-client.c b/src/libekolab/kolab-mail-imap-client.c
index 12e9b09..4b77448 100644
--- a/src/libekolab/kolab-mail-imap-client.c
+++ b/src/libekolab/kolab-mail-imap-client.c
@@ -883,6 +883,7 @@ kolab_mail_imap_client_go_online (KolabMailImapClient *self,
GError **err)
{
KolabMailImapClientPrivate *priv = NULL;
+ CamelKolabIMAPXSettings *settings;
const gchar *tmp_str = NULL;
GError *tmp_err = NULL;
gboolean ok = FALSE;
@@ -911,13 +912,8 @@ kolab_mail_imap_client_go_online (KolabMailImapClient *self,
camel_kolab_session_set_password (priv->session, tmp_str);
/* set the TPM token pin (we may get it late in the book backend) */
- tmp_str = kolab_settings_handler_get_char_field (priv->ksettings,
- KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN,
- &tmp_err);
- if (tmp_err != NULL) {
- g_propagate_error (err, tmp_err);
- return FALSE;
- }
+ settings = kolab_settings_handler_get_camel_settings (priv->ksettings);
+ tmp_str = camel_kolab_imapx_settings_get_pkcs11_pin (settings);
camel_kolab_session_set_token_pin (priv->session, tmp_str);
/* remove local CamelFolder object */
diff --git a/src/libekolab/kolab-settings-handler.c b/src/libekolab/kolab-settings-handler.c
index 79d0b3d..79d97a6 100644
--- a/src/libekolab/kolab-settings-handler.c
+++ b/src/libekolab/kolab-settings-handler.c
@@ -88,7 +88,6 @@ static KolabSettingsHandlerGetFunc _kolab_settings_handler_char_get_funcs[] = {
NULL, /* KOLAB_SETTINGS_HANDLER_CHAR_FIELD_CAMEL_ACCOUNT_DIR */
NULL, /* KOLAB_SETTINGS_HANDLER_CHAR_FIELD_ESOURCE_UID */
NULL, /* KOLAB_SETTINGS_HANDLER_CHAR_FIELD_KOLAB_USER_PASSWORD */
- NULL /* KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN */
};
static KolabSettingsHandlerCharSetFunc _kolab_settings_handler_char_set_funcs[] = {
@@ -98,7 +97,6 @@ static KolabSettingsHandlerCharSetFunc _kolab_settings_handler_char_set_funcs[]
NULL, /* KOLAB_SETTINGS_HANDLER_CHAR_FIELD_CAMEL_ACCOUNT_DIR */
NULL, /* KOLAB_SETTINGS_HANDLER_CHAR_FIELD_ESOURCE_UID */
NULL, /* KOLAB_SETTINGS_HANDLER_CHAR_FIELD_KOLAB_USER_PASSWORD */
- NULL /* KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN */
};
static KolabSettingsHandlerGetFunc _kolab_settings_handler_uint_get_funcs[] = {
diff --git a/src/libekolab/kolab-settings-handler.h b/src/libekolab/kolab-settings-handler.h
index 597d651..02f1b7d 100644
--- a/src/libekolab/kolab-settings-handler.h
+++ b/src/libekolab/kolab-settings-handler.h
@@ -127,7 +127,6 @@ typedef enum {
KOLAB_SETTINGS_HANDLER_CHAR_FIELD_CAMEL_ACCOUNT_DIR,
KOLAB_SETTINGS_HANDLER_CHAR_FIELD_ESOURCE_UID,
KOLAB_SETTINGS_HANDLER_CHAR_FIELD_KOLAB_USER_PASSWORD,
- KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN,
KOLAB_SETTINGS_HANDLER_CHAR_LAST_FIELD
} KolabSettingsHandlerCharFieldID;
diff --git a/src/libekolab/kolab-util-backend.c b/src/libekolab/kolab-util-backend.c
index 6f9e56a..2cdf145 100644
--- a/src/libekolab/kolab-util-backend.c
+++ b/src/libekolab/kolab-util-backend.c
@@ -319,7 +319,6 @@ kolab_util_backend_prepare_settings (KolabSettingsHandler *ksettings,
* on stdout/stderr and proceeds.
*/
const gchar *prop_str = NULL;
- KolabReqPkcs11 req_pkcs11_value;
GError *error = NULL;
g_debug ("%s()[%u] called.", __func__, __LINE__);
@@ -334,23 +333,6 @@ kolab_util_backend_prepare_settings (KolabSettingsHandler *ksettings,
g_error_free (error);
error = NULL;
}
- prop_str = e_source_get_property (esource, KOLAB_REQ_PKCS11_PROP);
- req_pkcs11_value = kolab_util_misc_req_pkcs11_from_property (prop_str);
- if (req_pkcs11_value == KOLAB_PKCS11_INFRASTRUCTURE_ENABLE) {
- prop_str = e_source_get_property (esource, KOLAB_PKCS11_PIN_PROP);
- }
- else {
- prop_str = NULL;
- }
- (void)kolab_settings_handler_set_char_field (ksettings,
- KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN,
- g_strdup (prop_str),
- &error);
- if (error != NULL) {
- g_warning ("%s()[%u] error: %s", __func__, __LINE__, error->message);
- g_error_free (error);
- error = NULL;
- }
}
if (password != NULL) {
(void)kolab_settings_handler_set_char_field (ksettings,
diff --git a/src/tests/integration/libekolab/test-kolab-mail-access.c b/src/tests/integration/libekolab/test-kolab-mail-access.c
index 90affa7..a34447f 100644
--- a/src/tests/integration/libekolab/test-kolab-mail-access.c
+++ b/src/tests/integration/libekolab/test-kolab-mail-access.c
@@ -107,6 +107,8 @@ kolab_itest_koma_ksettings_envset (KolabSettingsHandler *ksettings,
camel_network_settings_set_host (network_settings, servername);
camel_network_settings_set_security_method (network_settings, security);
+ camel_kolab_imapx_settings_set_pkcs11_pin (camel_settings, pkcs11pin);
+
ok = kolab_settings_handler_set_int_field (ksettings,
KOLAB_SETTINGS_HANDLER_INT_FIELD_KOLAB_SERVER_IMAP_PORT,
imapport,
@@ -125,15 +127,6 @@ kolab_itest_koma_ksettings_envset (KolabSettingsHandler *ksettings,
return FALSE;
}
- ok = kolab_settings_handler_set_char_field (ksettings,
- KOLAB_SETTINGS_HANDLER_CHAR_FIELD_PKCS11_USER_PIN,
- pkcs11pin,
- &tmp_err);
- if (! ok) {
- g_propagate_error (err, tmp_err);
- return FALSE;
- }
-
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]