[evolution-ews/gnome-3-8] Add X509 cert from GAL
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-3-8] Add X509 cert from GAL
- Date: Mon, 15 Jul 2013 12:05:55 +0000 (UTC)
commit d8df51ee4b600cb1bf91da9ce7dad9377be4f234
Author: David Woodhouse <David Woodhouse intel com>
Date: Mon Jul 15 12:02:45 2013 +0100
Add X509 cert from GAL
(cherry picked from commit 917c95ab04cad57649e9ac127edd1375affb74b5)
src/addressbook/ews-oab-decoder.c | 17 +++++++++++++++++
src/addressbook/ews-oab-props.h | 1 +
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/addressbook/ews-oab-decoder.c b/src/addressbook/ews-oab-decoder.c
index 9e89fa8..c55154b 100644
--- a/src/addressbook/ews-oab-decoder.c
+++ b/src/addressbook/ews-oab-decoder.c
@@ -143,6 +143,22 @@ ews_populate_string_list (EContact *contact,
}
static void
+ews_populate_cert (EContact *contact,
+ EContactField field,
+ gpointer value,
+ gpointer user_data)
+{
+ GSList *list = value;
+ GBytes *bytes = list->data;
+ EContactCert cert;
+
+ cert.data = (gpointer) g_bytes_get_data (bytes, &cert.length);
+ cert.length = g_bytes_get_size (bytes);
+
+ e_contact_set (contact, E_CONTACT_X509_CERT, &cert);
+}
+
+static void
ews_populate_photo (EContact *contact,
EContactField field,
gpointer value,
@@ -217,6 +233,7 @@ static const struct prop_field_mapping {
{EWS_PT_DL_MEMBERS, E_CONTACT_EMAIL, ews_populate_string_list},
{EWS_PT_THUMBNAIL_PHOTO, E_CONTACT_PHOTO, ews_populate_photo},
{EWS_PT_OFFICE_LOCATION, E_CONTACT_OFFICE, ews_populate_simple_string},
+ {EWS_PT_X509_CERT, E_CONTACT_X509_CERT, ews_populate_cert},
};
static void
diff --git a/src/addressbook/ews-oab-props.h b/src/addressbook/ews-oab-props.h
index b204838..057b8c4 100644
--- a/src/addressbook/ews-oab-props.h
+++ b/src/addressbook/ews-oab-props.h
@@ -74,5 +74,6 @@
#define EWS_PT_MEMBER_OF_DLS 0x8008101E
#define EWS_PT_TRUNCATED_PROPS 0x68051003
#define EWS_PT_THUMBNAIL_PHOTO 0x8C9E0102
+#define EWS_PT_X509_CERT 0x8c6a1102
#endif /* _EWS_OAB_PROPS */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]