aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java50
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java2
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/SelectSignKeyIdActivity.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java5
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java5
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DeleteKeyDialogActivity.java5
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextFragment.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiUserIdsFragment.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvCertsFragment.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java5
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java5
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAddedAdapter.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/AddUserIdDialogFragment.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java7
-rw-r--r--OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java15
m---------extern/openpgp-api-lib0
28 files changed, 69 insertions, 84 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java
index b3cf70c..c0cc9e2 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysListEntry.java
@@ -21,6 +21,7 @@ import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
import org.sufficientlysecure.keychain.pgp.UncachedKeyRing;
@@ -318,7 +319,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
public void updateMergedUserIds() {
mMergedUserIds = new HashMap<>();
for (String userId : mUserIds) {
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(userId);
// TODO: comment field?
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java
index 1ebab78..3e1aa71 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/KeyRing.java
@@ -20,6 +20,8 @@ package org.sufficientlysecure.keychain.pgp;
import android.text.TextUtils;
+import org.openintents.openpgp.util.OpenPgpUtils;
+import org.openintents.openpgp.util.OpenPgpUtils.UserId;
import org.sufficientlysecure.keychain.pgp.exception.PgpKeyNotFoundException;
import java.io.Serializable;
@@ -45,7 +47,7 @@ public abstract class KeyRing {
abstract public String getPrimaryUserIdWithFallback() throws PgpKeyNotFoundException;
- public UserId getSplitPrimaryUserIdWithFallback() throws PgpKeyNotFoundException {
+ public OpenPgpUtils.UserId getSplitPrimaryUserIdWithFallback() throws PgpKeyNotFoundException {
return splitUserId(getPrimaryUserIdWithFallback());
}
@@ -59,10 +61,6 @@ public abstract class KeyRing {
abstract public int getVerified() throws PgpKeyNotFoundException;
- private static final Pattern USER_ID_PATTERN = Pattern.compile("^(.*?)(?: \\((.*)\\))?(?: <(.*)>)?$");
-
- private static final Pattern EMAIL_PATTERN = Pattern.compile("^.*@.*\\..*$");
-
/**
* Splits userId string into naming part, email part, and comment part
* <p/>
@@ -70,53 +68,15 @@ public abstract class KeyRing {
* http://fiddle.re/t4p6f
*/
public static UserId splitUserId(final String userId) {
- if (!TextUtils.isEmpty(userId)) {
- final Matcher matcher = USER_ID_PATTERN.matcher(userId);
- if (matcher.matches()) {
- String name = matcher.group(1).isEmpty() ? null : matcher.group(1);
- String comment = matcher.group(2);
- String email = matcher.group(3);
- if (comment == null && email == null && name != null && EMAIL_PATTERN.matcher(name).matches()) {
- email = name;
- name = null;
- }
- return new UserId(name, email, comment);
- }
- }
- return new UserId(null, null, null);
+ return OpenPgpUtils.splitUserId(userId);
}
/**
* Returns a composed user id. Returns null if name, email and comment are empty.
*/
public static String createUserId(UserId userId) {
- StringBuilder userIdBuilder = new StringBuilder();
- if (!TextUtils.isEmpty(userId.name)) {
- userIdBuilder.append(userId.name);
- }
- if (!TextUtils.isEmpty(userId.comment)) {
- userIdBuilder.append(" (");
- userIdBuilder.append(userId.comment);
- userIdBuilder.append(")");
- }
- if (!TextUtils.isEmpty(userId.email)) {
- userIdBuilder.append(" <");
- userIdBuilder.append(userId.email);
- userIdBuilder.append(">");
- }
- return userIdBuilder.length() == 0 ? null : userIdBuilder.toString();
+ return OpenPgpUtils.createUserId(userId);
}
- public static class UserId implements Serializable {
- public final String name;
- public final String email;
- public final String comment;
-
- public UserId(String name, String email, String comment) {
- this.name = name;
- this.email = email;
- this.comment = comment;
- }
- }
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
index a0ebc69..8269578 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java
@@ -30,6 +30,7 @@ import android.os.RemoteException;
import android.support.annotation.NonNull;
import android.support.v4.util.LongSparseArray;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.keyimport.ParcelableKeyRing;
@@ -454,7 +455,7 @@ public class ProviderHelper {
String userId = Utf8Util.fromUTF8ByteArrayReplaceBadEncoding(rawUserId);
UserPacketItem item = new UserPacketItem();
uids.add(item);
- KeyRing.UserId splitUserId = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId splitUserId = KeyRing.splitUserId(userId);
item.userId = userId;
item.name = splitUserId.name;
item.email = splitUserId.email;
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
index 20baf3a..b2a9b50 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/OpenPgpService.java
@@ -53,6 +53,7 @@ import org.openintents.openpgp.OpenPgpError;
import org.openintents.openpgp.OpenPgpMetadata;
import org.openintents.openpgp.OpenPgpSignatureResult;
import org.openintents.openpgp.util.OpenPgpApi;
+import org.openintents.openpgp.util.OpenPgpUtils.UserId;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.operations.BackupOperation;
import org.sufficientlysecure.keychain.operations.results.DecryptVerifyResult;
@@ -61,7 +62,6 @@ import org.sufficientlysecure.keychain.operations.results.OperationResult.LogEnt
import org.sufficientlysecure.keychain.operations.results.PgpSignEncryptResult;
import org.sufficientlysecure.keychain.pgp.CanonicalizedPublicKeyRing;
import org.sufficientlysecure.keychain.pgp.KeyRing;
-import org.sufficientlysecure.keychain.pgp.KeyRing.UserId;
import org.sufficientlysecure.keychain.pgp.PgpDecryptVerifyInputParcel;
import org.sufficientlysecure.keychain.pgp.PgpDecryptVerifyOperation;
import org.sufficientlysecure.keychain.pgp.PgpSecurityConstants;
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java
index 18afd2f..bcfe54f 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/AccountSettingsFragment.java
@@ -26,6 +26,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.EditKeyResult;
@@ -92,7 +93,7 @@ public class AccountSettingsFragment extends Fragment {
}
private void createKey() {
- KeyRing.UserId userId = KeyRing.splitUserId(mAccSettings.getAccountName());
+ OpenPgpUtils.UserId userId = KeyRing.splitUserId(mAccSettings.getAccountName());
Intent intent = new Intent(getActivity(), CreateKeyActivity.class);
intent.putExtra(CreateKeyActivity.EXTRA_NAME, userId.name);
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/SelectSignKeyIdActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/SelectSignKeyIdActivity.java
index fd3f8f7..946c77c 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/SelectSignKeyIdActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/remote/ui/SelectSignKeyIdActivity.java
@@ -25,6 +25,7 @@ import android.view.View;
import android.widget.TextView;
import org.openintents.openpgp.util.OpenPgpApi;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.OperationResult;
@@ -90,7 +91,7 @@ public class SelectSignKeyIdActivity extends BaseActivity {
}
private void createKey(String userId) {
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(userId);
Intent intent = new Intent(this, CreateKeyActivity.class);
intent.putExtra(CreateKeyActivity.EXTRA_NAME, userIdSplit.name);
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java
index 227d6fc..99a4b02 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/CreateKeyFinalFragment.java
@@ -34,6 +34,7 @@ import android.widget.CheckBox;
import android.widget.TextView;
import org.bouncycastle.bcpg.sig.KeyFlags;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.EditKeyResult;
@@ -305,7 +306,7 @@ public class CreateKeyFinalFragment extends Fragment {
}
}
String userId = KeyRing.createUserId(
- new KeyRing.UserId(createKeyActivity.mName, createKeyActivity.mEmail, null)
+ new OpenPgpUtils.UserId(createKeyActivity.mName, createKeyActivity.mEmail, null)
);
saveKeyringParcel.mAddUserIds.add(userId);
saveKeyringParcel.mChangePrimaryUserId = userId;
@@ -313,7 +314,7 @@ public class CreateKeyFinalFragment extends Fragment {
&& createKeyActivity.mAdditionalEmails.size() > 0) {
for (String email : createKeyActivity.mAdditionalEmails) {
String thisUserId = KeyRing.createUserId(
- new KeyRing.UserId(createKeyActivity.mName, email, null)
+ new OpenPgpUtils.UserId(createKeyActivity.mName, email, null)
);
saveKeyringParcel.mAddUserIds.add(thisUserId);
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java
index bc3470b..b15985f 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java
@@ -39,6 +39,7 @@ import android.widget.ViewAnimator;
import org.openintents.openpgp.OpenPgpDecryptionResult;
import org.openintents.openpgp.OpenPgpSignatureResult;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.keyimport.ParcelableKeyRing;
@@ -308,7 +309,7 @@ public abstract class DecryptFragment extends Fragment implements LoaderManager.
long signatureKeyId = mSignatureResult.getKeyId();
String userId = data.getString(INDEX_USER_ID);
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(userId);
if (userIdSplit.name != null) {
mSignatureName.setText(userIdSplit.name);
} else {
@@ -418,7 +419,7 @@ public abstract class DecryptFragment extends Fragment implements LoaderManager.
}
String userId = mSignatureResult.getPrimaryUserId();
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(userId);
if (userIdSplit.name != null) {
mSignatureName.setText(userIdSplit.name);
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DeleteKeyDialogActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DeleteKeyDialogActivity.java
index 4782591..a32dc17 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DeleteKeyDialogActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DeleteKeyDialogActivity.java
@@ -35,6 +35,7 @@ import android.widget.AdapterView;
import android.widget.Spinner;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.DeleteResult;
@@ -100,7 +101,7 @@ public class DeleteKeyDialogActivity extends FragmentActivity {
);
String name;
- KeyRing.UserId mainUserId = KeyRing.splitUserId(
+ OpenPgpUtils.UserId mainUserId = KeyRing.splitUserId(
(String) data.get(KeychainContract.KeyRings.USER_ID));
if (mainUserId.name != null) {
name = mainUserId.name;
@@ -280,7 +281,7 @@ public class DeleteKeyDialogActivity extends FragmentActivity {
}
);
String name;
- KeyRing.UserId mainUserId = KeyRing.splitUserId((String) data.get(KeychainContract.KeyRings.USER_ID));
+ OpenPgpUtils.UserId mainUserId = KeyRing.splitUserId((String) data.get(KeychainContract.KeyRings.USER_ID));
if (mainUserId.name != null) {
name = mainUserId.name;
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
index 80bac18..258aeba 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptFilesFragment.java
@@ -58,6 +58,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.SignEncryptResult;
@@ -704,7 +705,7 @@ public class EncryptFilesFragment
Set<String> users = new HashSet<>();
for (String user : encryptionUserIds) {
- KeyRing.UserId userId = KeyRing.splitUserId(user);
+ OpenPgpUtils.UserId userId = KeyRing.splitUserId(user);
if (userId.email != null) {
users.add(userId.email);
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextFragment.java
index f805c70..e021848 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptTextFragment.java
@@ -33,6 +33,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.SignEncryptResult;
@@ -326,7 +327,7 @@ public class EncryptTextFragment
Set<String> users = new HashSet<>();
for (String user : encryptionUserIds) {
- KeyRing.UserId userId = KeyRing.splitUserId(user);
+ OpenPgpUtils.UserId userId = KeyRing.splitUserId(user);
if (userId.email != null) {
users.add(userId.email);
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiUserIdsFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiUserIdsFragment.java
index 8ba695c..5116073 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiUserIdsFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/MultiUserIdsFragment.java
@@ -15,6 +15,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
@@ -151,7 +152,7 @@ public class MultiUserIdsFragment extends Fragment implements LoaderManager.Load
while (!data.isAfterLast()) {
long masterKeyId = data.getLong(INDEX_MASTER_KEY_ID);
String userId = data.getString(INDEX_USER_ID);
- KeyRing.UserId pieces = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId pieces = KeyRing.splitUserId(userId);
// Two cases:
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java
index 2c562c3..5f4303b 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/PassphraseDialogActivity.java
@@ -46,6 +46,7 @@ import android.widget.TextView;
import android.widget.Toast;
import android.widget.ViewAnimator;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.CanonicalizedSecretKey;
@@ -236,7 +237,7 @@ public class PassphraseDialogActivity extends FragmentActivity {
// above can't be statically verified to have been set in all cases because
// the catch clause doesn't return.
String mainUserId = cachedPublicKeyRing.getPrimaryUserIdWithFallback();
- KeyRing.UserId mainUserIdSplit = KeyRing.splitUserId(mainUserId);
+ OpenPgpUtils.UserId mainUserIdSplit = KeyRing.splitUserId(mainUserId);
if (mainUserIdSplit.name != null) {
userId = mainUserIdSplit.name;
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
index ca4a339..4dceb94 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
@@ -67,6 +67,7 @@ import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.keyimport.ParcelableKeyRing;
@@ -877,7 +878,7 @@ public class ViewKeyActivity extends BaseSecurityTokenActivity implements
if (data.moveToFirst()) {
// get name, email, and comment from USER_ID
- KeyRing.UserId mainUserId = KeyRing.splitUserId(data.getString(INDEX_USER_ID));
+ OpenPgpUtils.UserId mainUserId = KeyRing.splitUserId(data.getString(INDEX_USER_ID));
if (mainUserId.name != null) {
mCollapsingToolbarLayout.setTitle(mainUserId.name);
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java
index b9a8259..0be6462 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvActivity.java
@@ -41,6 +41,7 @@ import android.widget.Toast;
import com.astuetz.PagerSlidingTabStrip;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.OperationResult;
@@ -213,7 +214,7 @@ public class ViewKeyAdvActivity extends BaseActivity implements
case LOADER_ID_UNIFIED: {
if (data.moveToFirst()) {
// get name, email, and comment from USER_ID
- KeyRing.UserId mainUserId = KeyRing.splitUserId(data.getString(INDEX_USER_ID));
+ OpenPgpUtils.UserId mainUserId = KeyRing.splitUserId(data.getString(INDEX_USER_ID));
if (mainUserId.name != null) {
setTitle(mainUserId.name);
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvCertsFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvCertsFragment.java
index f5c8a87..c39881e 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvCertsFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvCertsFragment.java
@@ -32,6 +32,7 @@ import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
@@ -237,7 +238,7 @@ public class ViewKeyAdvCertsFragment extends LoaderFragment implements
TextView wSignStatus = (TextView) view.findViewById(R.id.signStatus);
String signerKeyId = KeyFormattingUtils.beautifyKeyIdWithPrefix(getActivity(), cursor.getLong(mIndexSignerKeyId));
- KeyRing.UserId userId = KeyRing.splitUserId(cursor.getString(mIndexSignerUserId));
+ OpenPgpUtils.UserId userId = KeyRing.splitUserId(cursor.getString(mIndexSignerUserId));
if (userId.name != null) {
wSignerName.setText(userId.name);
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java
index 02eae1b..e2a91b0 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyAdvShareFragment.java
@@ -51,6 +51,7 @@ import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
@@ -247,7 +248,7 @@ public class ViewKeyAdvShareFragment extends LoaderFragment implements
TemporaryFileProvider shareFileProv = new TemporaryFileProvider();
String filename = KeyFormattingUtils.convertFingerprintToHex(mFingerprint);
- KeyRing.UserId mainUserId = KeyRing.splitUserId(mUserId);
+ OpenPgpUtils.UserId mainUserId = KeyRing.splitUserId(mUserId);
if (mainUserId.name != null) {
filename = mainUserId.name;
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
index 0be7e8f..a6d3111 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java
@@ -31,6 +31,7 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.keyimport.ImportKeysListEntry;
import org.sufficientlysecure.keychain.operations.ImportOperation;
@@ -141,7 +142,7 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
// main user id
String userId = entry.getUserIds().get(0);
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(userId);
// name
if (userIdSplit.name != null) {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java
index 78aaeca..56dd15a 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyAdapter.java
@@ -38,6 +38,7 @@ import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.CanonicalizedPublicKey;
import org.sufficientlysecure.keychain.pgp.CanonicalizedPublicKeyRing;
@@ -125,7 +126,7 @@ public class KeyAdapter extends CursorAdapter {
mDisplayedItem = item;
{ // set name and stuff, common to both key types
- KeyRing.UserId userIdSplit = item.mUserId;
+ OpenPgpUtils.UserId userIdSplit = item.mUserId;
if (userIdSplit.name != null) {
mMainUserId.setText(highlighter.highlight(userIdSplit.name));
} else {
@@ -288,7 +289,7 @@ public class KeyAdapter extends CursorAdapter {
public static class KeyItem implements Serializable {
public final String mUserIdFull;
- public final KeyRing.UserId mUserId;
+ public final OpenPgpUtils.UserId mUserId;
public final long mKeyId;
public final boolean mHasDuplicate;
public final boolean mHasEncrypt;
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java
index d247fad..b6da1ed 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/MultiUserIdsAdapter.java
@@ -30,6 +30,7 @@ import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
import org.sufficientlysecure.keychain.service.CertifyActionsParcel.CertifyAction;
@@ -87,7 +88,7 @@ public class MultiUserIdsAdapter extends CursorAdapter {
{ // first one
String userId = uids.get(0);
- KeyRing.UserId splitUserId = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId splitUserId = KeyRing.splitUserId(userId);
if (splitUserId.name != null) {
vName.setText(splitUserId.name);
} else {
@@ -112,7 +113,7 @@ public class MultiUserIdsAdapter extends CursorAdapter {
StringBuilder lines = new StringBuilder();
for (String uid : uids) {
- KeyRing.UserId splitUserId = KeyRing.splitUserId(uid);
+ OpenPgpUtils.UserId splitUserId = KeyRing.splitUserId(uid);
if (splitUserId.email == null) {
continue;
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
index f01f252..3e94ac7 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
@@ -29,6 +29,7 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
import org.sufficientlysecure.keychain.provider.KeychainContract.KeyRings;
@@ -118,7 +119,7 @@ abstract public class SelectKeyCursorAdapter extends CursorAdapter {
ViewHolderItem h = (ViewHolderItem) view.getTag();
String userId = cursor.getString(mIndexUserId);
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(userId);
if (userIdSplit.name != null) {
h.mainUserId.setText(highlighter.highlight(userIdSplit.name));
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java
index e86a781..26a604e 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAdapter.java
@@ -32,6 +32,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import android.widget.ViewAnimator;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
import org.sufficientlysecure.keychain.provider.KeychainContract.Certs;
@@ -70,7 +71,7 @@ public class UserIdsAdapter extends UserAttributesAdapter {
vDeleteButton.setVisibility(View.GONE); // not used
String userId = cursor.getString(INDEX_USER_ID);
- KeyRing.UserId splitUserId = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId splitUserId = KeyRing.splitUserId(userId);
if (splitUserId.name != null) {
vName.setText(splitUserId.name);
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAddedAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAddedAdapter.java
index b1892b2..7186a08 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAddedAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/UserIdsAddedAdapter.java
@@ -28,6 +28,7 @@ import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
@@ -92,7 +93,7 @@ public class UserIdsAddedAdapter extends ArrayAdapter<String> {
// save reference to model item
holder.mModel = getItem(position);
- KeyRing.UserId splitUserId = KeyRing.splitUserId(holder.mModel);
+ OpenPgpUtils.UserId splitUserId = KeyRing.splitUserId(holder.mModel);
if (splitUserId.name != null) {
holder.vName.setText(splitUserId.name);
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/AddUserIdDialogFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/AddUserIdDialogFragment.java
index 4500ccd..2daece4 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/AddUserIdDialogFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/AddUserIdDialogFragment.java
@@ -38,6 +38,7 @@ import android.widget.EditText;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
@@ -110,7 +111,7 @@ public class AddUserIdDialogFragment extends DialogFragment implements OnEditorA
// return new user id back to activity
Bundle data = new Bundle();
- String userId = KeyRing.createUserId(new KeyRing.UserId(mName.getText().toString(),
+ String userId = KeyRing.createUserId(new OpenPgpUtils.UserId(mName.getText().toString(),
mEmail.getText().toString(), mComment.getText().toString()));
data.putString(MESSAGE_DATA_USER_ID, userId);
sendMessageToHandler(MESSAGE_OKAY, data);
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java
index 4dc0eba..64a960d 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/util/KeyFormattingUtils.java
@@ -37,6 +37,7 @@ import org.bouncycastle.asn1.nist.NISTNamedCurves;
import org.bouncycastle.asn1.teletrust.TeleTrusTNamedCurves;
import org.bouncycastle.bcpg.PublicKeyAlgorithmTags;
import org.bouncycastle.util.encoders.Hex;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.operations.results.DecryptVerifyResult;
@@ -593,7 +594,7 @@ public class KeyFormattingUtils {
holder.getSignatureAction().setDisplayedChild(sigActionDisplayedChild);
String userId = result.getSignatureResult().getPrimaryUserId();
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(userId);
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(userId);
if (userIdSplit.name != null) {
holder.getSignatureUserName().setText(userIdSplit.name);
} else {
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java
index 29e6f4e..3d82b9b 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ContactHelper.java
@@ -34,6 +34,7 @@ import android.provider.ContactsContract;
import android.support.v4.content.ContextCompat;
import android.util.Patterns;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.KeyRing;
@@ -503,7 +504,7 @@ public class ContactHelper {
if (cursor != null) {
while (cursor.moveToNext()) {
long masterKeyId = cursor.getLong(INDEX_MASTER_KEY_ID);
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(cursor.getString(INDEX_USER_ID));
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(cursor.getString(INDEX_USER_ID));
boolean isExpired = cursor.getInt(INDEX_IS_EXPIRED) != 0;
boolean isRevoked = cursor.getInt(INDEX_IS_REVOKED) > 0;
boolean isVerified = cursor.getInt(INDEX_VERIFIED) > 0;
@@ -578,7 +579,7 @@ public class ContactHelper {
long masterKeyId = cursor.getLong(INDEX_MASTER_KEY_ID);
boolean isExpired = cursor.getInt(INDEX_IS_EXPIRED) != 0;
boolean isRevoked = cursor.getInt(INDEX_IS_REVOKED) > 0;
- KeyRing.UserId userIdSplit = KeyRing.splitUserId(cursor.getString(INDEX_USER_ID));
+ OpenPgpUtils.UserId userIdSplit = KeyRing.splitUserId(cursor.getString(INDEX_USER_ID));
if (!isExpired && !isRevoked && userIdSplit.name != null) {
// if expired or revoked will not be removed from keysToDelete or inserted
@@ -840,7 +841,7 @@ public class ContactHelper {
null, null);
if (ids != null) {
while (ids.moveToNext()) {
- KeyRing.UserId userId = KeyRing.splitUserId(ids.getString(0));
+ OpenPgpUtils.UserId userId = KeyRing.splitUserId(ids.getString(0));
if (userId.email != null) {
ops.add(referenceRawContact(
ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI),
diff --git a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java
index 97feeea..64579bb 100644
--- a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java
+++ b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/SplitUserIdTest.java
@@ -20,6 +20,7 @@ package org.sufficientlysecure.keychain.pgp;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.openintents.openpgp.util.OpenPgpUtils;
import org.robolectric.RobolectricGradleTestRunner;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
@@ -32,7 +33,7 @@ public class SplitUserIdTest {
@Test
public void splitCompleteUserIdShouldReturnAll3Components() throws Exception {
- KeyRing.UserId info = KeyRing.splitUserId("Max Mustermann (this is a comment) <max@example.com>");
+ OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann (this is a comment) <max@example.com>");
Assert.assertEquals("Max Mustermann", info.name);
Assert.assertEquals("this is a comment", info.comment);
Assert.assertEquals("max@example.com", info.email);
@@ -40,7 +41,7 @@ public class SplitUserIdTest {
@Test
public void splitUserIdWithAllButCommentShouldReturnNameAndEmail() throws Exception {
- KeyRing.UserId info = KeyRing.splitUserId("Max Mustermann <max@example.com>");
+ OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann <max@example.com>");
Assert.assertEquals("Max Mustermann", info.name);
Assert.assertNull(info.comment);
Assert.assertEquals("max@example.com", info.email);
@@ -48,7 +49,7 @@ public class SplitUserIdTest {
@Test
public void splitUserIdWithAllButEmailShouldReturnNameAndComment() throws Exception {
- KeyRing.UserId info = KeyRing.splitUserId("Max Mustermann (this is a comment)");
+ OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann (this is a comment)");
Assert.assertEquals("Max Mustermann", info.name);
Assert.assertEquals("this is a comment", info.comment);
Assert.assertNull(info.email);
@@ -56,7 +57,7 @@ public class SplitUserIdTest {
@Test
public void splitUserIdWithCommentAndEmailShouldReturnCommentAndEmail() throws Exception {
- KeyRing.UserId info = KeyRing.splitUserId(" (this is a comment) <max@example.com>");
+ OpenPgpUtils.UserId info = KeyRing.splitUserId(" (this is a comment) <max@example.com>");
Assert.assertNull(info.name);
Assert.assertEquals("this is a comment", info.comment);
Assert.assertEquals("max@example.com", info.email);
@@ -64,7 +65,7 @@ public class SplitUserIdTest {
@Test
public void splitUserIdWithEmailShouldReturnEmail() throws Exception {
- KeyRing.UserId info = KeyRing.splitUserId("max@example.com");
+ OpenPgpUtils.UserId info = KeyRing.splitUserId("max@example.com");
Assert.assertNull(info.name);
Assert.assertNull(info.comment);
Assert.assertEquals("max@example.com", info.email);
@@ -72,7 +73,7 @@ public class SplitUserIdTest {
@Test
public void splitUserIdWithNameShouldReturnName() throws Exception {
- KeyRing.UserId info = KeyRing.splitUserId("Max Mustermann");
+ OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann");
Assert.assertEquals("Max Mustermann", info.name);
Assert.assertNull(info.comment);
Assert.assertNull(info.email);
@@ -80,7 +81,7 @@ public class SplitUserIdTest {
@Test
public void splitUserIdWithCommentShouldReturnComment() throws Exception {
- KeyRing.UserId info = KeyRing.splitUserId(" (this is a comment)");
+ OpenPgpUtils.UserId info = KeyRing.splitUserId(" (this is a comment)");
Assert.assertNull(info.name);
Assert.assertEquals("this is a comment", info.comment);
Assert.assertNull(info.email);
diff --git a/extern/openpgp-api-lib b/extern/openpgp-api-lib
-Subproject e61c349b9ed0dc911cc3ced1ba3ba24a4a9df5e
+Subproject 32794ee94fcd3c8065163da1f6da41e7ceb87c0