aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java
diff options
context:
space:
mode:
authorAlex Fong <alexfongg@gmail.com>2016-03-15 10:24:28 +0800
committerAlex Fong <alexfongg@gmail.com>2016-05-04 22:36:23 +0800
commit525788359c6821a958ee7306ef3aa34d7b211a6f (patch)
treedf76551c2d2b187db62bba313eda1886fa1e7bf1 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java
parent6b7a0597af7aa42b375ca34d8a47515fa8adcc9f (diff)
downloadopen-keychain-525788359c6821a958ee7306ef3aa34d7b211a6f.tar.gz
open-keychain-525788359c6821a958ee7306ef3aa34d7b211a6f.tar.bz2
open-keychain-525788359c6821a958ee7306ef3aa34d7b211a6f.zip
(WIP) Change password when key is stripped #1692
Approach: Find the first unstripped secret key and use it for passphrase verification All unstripped keys will have their passphrase changed to new passphrase, if possible. Current Progress: Changing the passphrase of keys works fine. Refactoring to combine "modifySecretKeyring" and newly added method, "modifyKeyRingPassword" may be possible if given the go-ahead.
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java48
1 files changed, 0 insertions, 48 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java
index dc892ecc8..563a67b3f 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/SaveKeyringParcel.java
@@ -344,54 +344,6 @@ public class SaveKeyringParcel implements Parcelable {
// BRAINPOOL_P256, BRAINPOOL_P384, BRAINPOOL_P512
}
- /** This subclass contains information on how the passphrase should be changed.
- *
- * If no changes are to be made, this class should NOT be used!
- *
- * At this point, there must be *exactly one* non-null value here, which specifies the type
- * of unlocking mechanism to use.
- *
- */
- public static class ChangeUnlockParcel implements Parcelable {
-
- // The new passphrase to use
- public final Passphrase mNewPassphrase;
-
- public ChangeUnlockParcel(Passphrase newPassphrase) {
- if (newPassphrase == null) {
- throw new AssertionError("newPassphrase must be non-null. THIS IS A BUG!");
- }
- mNewPassphrase = newPassphrase;
- }
-
- public ChangeUnlockParcel(Parcel source) {
- mNewPassphrase = source.readParcelable(Passphrase.class.getClassLoader());
- }
-
- @Override
- public void writeToParcel(Parcel destination, int flags) {
- destination.writeParcelable(mNewPassphrase, flags);
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- public static final Creator<ChangeUnlockParcel> CREATOR = new Creator<ChangeUnlockParcel>() {
- public ChangeUnlockParcel createFromParcel(final Parcel source) {
- return new ChangeUnlockParcel(source);
- }
-
- public ChangeUnlockParcel[] newArray(final int size) {
- return new ChangeUnlockParcel[size];
- }
- };
- public String toString() {
- return "passphrase (" + mNewPassphrase + ")";
- }
-
- }
}