-
Notifications
You must be signed in to change notification settings - Fork 498
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
Encrypt backed up messages #780
base: master
Are you sure you want to change the base?
Conversation
I'm not receiving my messages |
Vào 17-08-2017 03:07, "ashh87" <[email protected]> đã viết:
… These patches allow using the openpgp android API to encrypt backed up
messages (SMS only, no decryption on restore).
I've been using these patches for years. I've taken the experimental
decryption stuff out from my old git repo, as I haven't had a chance to
finish it, and have never really needed it. Maybe I'll get round to it some
day, as well as encrypting MMS messages! Most important to me is SMS
encryption though, because it prevents a compromised email address being
used to get round two-factor authentication or account recovery using SMS
for any other service which knows the user's phone number.
------------------------------
You can view, comment on, or merge this pull request online at:
#780
Commit Summary
- use jcenter openpgp-api
- Allow encrypting SMS messages
File Changes
- *M* pom.xml
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-0>
(18)
- *M* res/values/strings.xml
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-1> (8)
- *M* res/xml/preferences.xml
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-2>
(14)
- *M* src/main/java/com/zegoggles/smssync/activity/MainActivity.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-3>
(52)
- *M* src/main/java/com/zegoggles/smssync/mail/MessageConverter.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-4> (8)
- *M* src/main/java/com/zegoggles/smssync/mail/MessageGenerator.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-5>
(43)
- *M* src/main/java/com/zegoggles/smssync/preferences/Preferences.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-6>
(25)
- *M* src/main/java/com/zegoggles/smssync/service/BackupTask.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-7>
(24)
- *M* src/main/java/com/zegoggles/smssync/service/
SmsRestoreService.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-8> (3)
- *M* src/test/java/com/zegoggles/smssync/mail/
MessageConverterTest.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-9> (8)
- *M* src/test/java/com/zegoggles/smssync/mail/
MessageGeneratorTest.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-10>
(6)
- *M* src/test/java/com/zegoggles/smssync/service/BackupTaskTest.java
<https://github.com/jberkel/sms-backup-plus/pull/780/files#diff-11>
(4)
Patch Links:
- https://github.com/jberkel/sms-backup-plus/pull/780.patch
- https://github.com/jberkel/sms-backup-plus/pull/780.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#780>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ac2zsB-JOyRrmlT3Wid_ZcqKbynUEbaiks5sY0v7gaJpZM4O5aar>
.
|
@yasmime Which messages - SMS or encrypted messages in email? |
Looks like it fails because Roboelectric can't inflate the extended preferences provided by the openpgp api. It needs to be told about them somehow. |
hmm I have no idea, maybe not supported by Robolectric?
Looks like a bug: it tries to inflate |
Running the gradle build straight after the maven build results in more errors, because the roboelectric.properties points to the previously unpacked external libs, which it doesn't like. I think cleaning between builds might help this. When I run the gradle build on its own, I continue to get a Resources$NotFoundException. According to http://robolectric.org/using-libraries/, gradle should pick up external libs automatically. I tried pointing it to the AndroidManifest.xml, via @config, but this didn't help. I'm not sure what to do to get gradle bult tests to work here - updated gradle/gradlewrapper? |
I think maven and gradle use different directories ( |
…cked by maven when run from gradle.
Cleaning between builds brings the gradle build back to failing for the resource not found exception because I changed roboelectric.properties to point to the unpacked lib from the maven build (edit: which now passes). The clean gets rid of it, so on the gradle build, it goes back to failing for being unable to inflate the openpgp-api preferences, rather than because the unpacked lib it finds is somehow wrong for it. The link above suggests gradle should organise everything so roboelectric doesn't need any special config. The maven build now passes, but the gradle build doesn't seem to put things together enough for roboelectric to pick up on the lib. I wondered if a different version of gradle might help, or maybe changing something in the gradle config? I don't know anything about configuring gradle really :S |
I'll have a look. the maven build will be removed soon, no point maintaining two different systems. |
Currently looking at custom runners (extended RobolectricTestRunner), with no success so far. Wonder if some shadow class would help to dodge round the problem. |
FIY: maven is gone from the master branch now |
…logpreference incompatibility (?)
Have I understood correctly that there's no encryption support in SMS Backup+ at the moment? Any ideas if that could happen any time in the near future? |
@jluttine there's no encryption support, and I'm not sure what's missing on this branch |
This branch won't compile because the preferences UI part of the encryption API isn't compatible with the version of support libs used here. All that needs to be done is create some new custom preferences and make sure everything still works as expected. These could even be contributed back to openkeychain. This shouldn't take too long to do, but it has been on my task list for a long time. |
These patches allow using the openpgp android API to encrypt backed up messages (SMS only, no decryption on restore).
I've been using these patches for years. I've taken the experimental decryption stuff out from my old git repo, as I haven't had a chance to finish it, and have never really needed it. Maybe I'll get round to it some day, as well as encrypting MMS messages! Most important to me is SMS encryption though, because it prevents a compromised email address being used to get round two-factor authentication or account recovery using SMS for any other service which knows the user's phone number.