Compare commits

...

5 commits

Author SHA1 Message Date
Peter Cai 8f9728cd60 Catch SecurityException from using a stale Tag object
Applications are not supposed to be able to do any I/O using a stale Tag
object. This was not checked in older Android versions, but enforced
later since Android 13 (and possibly in Android 12L).

When we are checking for a disconnected tag, the Tag object can become
stale if the same tag (or another tag) gets rediscovered. In addition,
if NfcService is restarted for some reason, the cookie value used to
check for this will also be reset to 0. In any case, a SecurityException
could be raised when checking for a disconnected tag, and we should be
able to handle this case.
2022-12-12 18:27:40 -05:00
Vincent Breitmoser 6f38af1582 Add note about maintenance mode to readme
Both @dschuermann and myself no longer spend a lot of time on this
project.

Here's a brief summary of a blog post we never wrote:

* All of OpenKeychain's UI is an anti-feature.
* If the user is doing anything in OpenKeychain's UI, OpenPGP is still doing it wrong.
* OpenKeychain shouldn't be an app, it should be a library.
* Changing OpenKeychain into a library is more work than we are motivated to do in our free time.
2021-08-17 11:27:38 +02:00
Dominik Schürmann fdd7c00a80
Merge pull request #2699 from android-password-store/accept-invalid-emails
Bump openpgp-api and add a test for TLD-less email
2021-05-02 19:30:02 +02:00
Harsh Shandilya 6b3368acb2
Update SplitUserIdTest.java 2021-05-02 19:23:02 +05:30
Harsh Shandilya 6408bac245
OpenKeychain: add a test for TLD-less email
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-05-02 19:04:20 +05:30
3 changed files with 23 additions and 5 deletions

View file

@ -331,12 +331,18 @@ public class SecurityTokenOperationActivity extends BaseSecurityTokenActivity {
protected Void doInBackground(Void... params) {
// check all 200ms if Security Token has been taken away
while (true) {
if (stConnection.isConnected()) {
try {
try {
if (stConnection.isConnected()) {
Thread.sleep(200);
} catch (InterruptedException ignored) {
} else {
return null;
}
} else {
} catch (InterruptedException ignored) {
// Sleep interrupted; ignore
} catch (SecurityException ignored) {
// In newer version of Android, isConnected() can throw an SecurityException
// when the Tag object becomes "stale"; this simply means the tag has been removed
// (and possibly rediscovered), so we can safely break from here.
return null;
}
}

View file

@ -130,4 +130,12 @@ public class SplitUserIdTest {
Assert.assertEquals("this is a comment", info.comment);
}
}
@Test
public void splitUserIdWithEmailWithoutTldShouldReturnNameAndEmail() {
OpenPgpUtils.UserId info = KeyRing.splitUserId("Max Mustermann <max@localhost>");
Assert.assertEquals("Max Mustermann", info.name);
Assert.assertEquals("max@localhost", info.email);
Assert.assertNull(info.comment);
}
}

View file

@ -1,3 +1,7 @@
**WARNING: This software is no longer actively developed.**
We will still apply security fixes where reported, and do basic maintenance work, but no new features or will be worked on.
We will try to consider and merge contributions where possible.
# OpenKeychain (for Android)
OpenKeychain is an OpenPGP implementation for Android.