mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 16:38:50 -05:00
Fix expiry when adding subkeys
This commit is contained in:
parent
474fc50b80
commit
4d698c896a
@ -168,9 +168,9 @@ public class CreateKeyFinalFragment extends Fragment {
|
|||||||
Bundle data = new Bundle();
|
Bundle data = new Bundle();
|
||||||
|
|
||||||
SaveKeyringParcel parcel = new SaveKeyringParcel();
|
SaveKeyringParcel parcel = new SaveKeyringParcel();
|
||||||
parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd(PublicKeyAlgorithmTags.RSA_GENERAL, 4096, KeyFlags.CERTIFY_OTHER, null));
|
parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd(PublicKeyAlgorithmTags.RSA_GENERAL, 4096, KeyFlags.CERTIFY_OTHER, 0L));
|
||||||
parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd(PublicKeyAlgorithmTags.RSA_GENERAL, 4096, KeyFlags.SIGN_DATA, null));
|
parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd(PublicKeyAlgorithmTags.RSA_GENERAL, 4096, KeyFlags.SIGN_DATA, 0L));
|
||||||
parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd(PublicKeyAlgorithmTags.RSA_GENERAL, 4096, KeyFlags.ENCRYPT_COMMS | KeyFlags.ENCRYPT_STORAGE, null));
|
parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd(PublicKeyAlgorithmTags.RSA_GENERAL, 4096, KeyFlags.ENCRYPT_COMMS | KeyFlags.ENCRYPT_STORAGE, 0L));
|
||||||
String userId = KeyRing.createUserId(mName, mEmail, null);
|
String userId = KeyRing.createUserId(mName, mEmail, null);
|
||||||
parcel.mAddUserIds.add(userId);
|
parcel.mAddUserIds.add(userId);
|
||||||
parcel.mChangePrimaryUserId = userId;
|
parcel.mChangePrimaryUserId = userId;
|
||||||
|
@ -503,7 +503,6 @@ public class EditKeyFragment extends LoaderFragment implements
|
|||||||
private void save(String passphrase) {
|
private void save(String passphrase) {
|
||||||
Log.d(Constants.TAG, "mSaveKeyringParcel:\n" + mSaveKeyringParcel.toString());
|
Log.d(Constants.TAG, "mSaveKeyringParcel:\n" + mSaveKeyringParcel.toString());
|
||||||
|
|
||||||
// Message is received after importing is done in KeychainIntentService
|
|
||||||
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(
|
KeychainIntentServiceHandler saveHandler = new KeychainIntentServiceHandler(
|
||||||
getActivity(),
|
getActivity(),
|
||||||
getString(R.string.progress_saving),
|
getString(R.string.progress_saving),
|
||||||
|
@ -183,9 +183,9 @@ public class AddSubkeyDialogFragment extends DialogFragment {
|
|||||||
flags |= KeyFlags.AUTHENTICATION;
|
flags |= KeyFlags.AUTHENTICATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
Long expiry;
|
long expiry;
|
||||||
if (mNoExpiryCheckBox.isChecked()) {
|
if (mNoExpiryCheckBox.isChecked()) {
|
||||||
expiry = null;
|
expiry = 0L;
|
||||||
} else {
|
} else {
|
||||||
Calendar selectedCal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
Calendar selectedCal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||||
//noinspection ResourceType
|
//noinspection ResourceType
|
||||||
|
Loading…
Reference in New Issue
Block a user