Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes SourceForge #85 LDAP userCertificate #98

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/java/davmail/exchange/ExchangeSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,8 @@ public String getBody() {
writer.writeLine("PHOTO;TYPE=" + contactPhoto.contentType + ";ENCODING=BASE64:");
writer.writeLine(contactPhoto.content, true);
}

writer.appendProperty("KEY;X509;ENCODING=BASE64", get("msexchangecertificate"));

writer.endCard();
return writer.toString();
Expand Down Expand Up @@ -3012,6 +3014,7 @@ public String getAlias() {
CONTACT_ATTRIBUTES.add("private");
CONTACT_ATTRIBUTES.add("sensitivity");
CONTACT_ATTRIBUTES.add("fburl");
CONTACT_ATTRIBUTES.add("msexchangecertificate");
}

protected static final Set<String> DISTRIBUTION_LIST_ATTRIBUTES = new HashSet<>();
Expand Down
34 changes: 34 additions & 0 deletions src/java/davmail/exchange/ews/ContactDataShape.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* DavMail POP/IMAP/SMTP/CalDav/LDAP Exchange Gateway
* Copyright (C) 2010 Mickael Guessant
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package davmail.exchange.ews;

/**
* ResolveNames contact data shape.
*/
@SuppressWarnings({"UnusedDeclaration"})
public class ContactDataShape extends AttributeOption {
private ContactDataShape(String value) {
super("ContactDataShape", value);
}

public static final ContactDataShape IdOnly = new ContactDataShape("IdOnly");
public static final ContactDataShape Default = new ContactDataShape("Default");
public static final ContactDataShape AllProperties = new ContactDataShape("AllProperties");

}
1 change: 1 addition & 0 deletions src/java/davmail/exchange/ews/EwsExchangeSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -3030,6 +3030,7 @@ protected void internalExecuteMethod(EWSMethod ewsMethod) throws IOException {

GALFIND_ATTRIBUTE_MAP.put("homePhone", "HomePhone");
GALFIND_ATTRIBUTE_MAP.put("pager", "Pager");
GALFIND_ATTRIBUTE_MAP.put("msexchangecertificate", "MSExchangeCertificate");
}

protected static final HashSet<String> IGNORE_ATTRIBUTE_SET = new HashSet<>();
Expand Down
2 changes: 2 additions & 0 deletions src/java/davmail/exchange/ews/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ private Field() {
// attachments
FIELD_MAP.put("attachments", new UnindexedFieldURI("item:Attachments"));

// user certificate
FIELD_MAP.put("msexchangecertificate", new UnindexedFieldURI("contacts:MSExchangeCertificate"));
}

/**
Expand Down
Loading