upload only public key in revocation
This commit is contained in:
@@ -43,6 +43,7 @@ import org.sufficientlysecure.keychain.service.input.RequiredInputParcel;
|
|||||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||||
import org.sufficientlysecure.keychain.util.ProgressScaler;
|
import org.sufficientlysecure.keychain.util.ProgressScaler;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -133,11 +134,22 @@ public class EditKeyOperation extends BaseOperation<SaveKeyringParcel> {
|
|||||||
UncachedKeyRing ring = modifyResult.getRing();
|
UncachedKeyRing ring = modifyResult.getRing();
|
||||||
|
|
||||||
if (saveParcel.isUpload()) {
|
if (saveParcel.isUpload()) {
|
||||||
|
UncachedKeyRing publicKeyRing;
|
||||||
|
try {
|
||||||
|
publicKeyRing = ring.extractPublicKeyRing();
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.add(LogType.MSG_ED_ERROR_EXTRACTING_PUBLIC_UPLOAD, 1);
|
||||||
|
return new EditKeyResult(EditKeyResult.RESULT_ERROR, log, null);
|
||||||
|
}
|
||||||
|
|
||||||
ExportKeyringParcel exportKeyringParcel =
|
ExportKeyringParcel exportKeyringParcel =
|
||||||
new ExportKeyringParcel(saveParcel.getUploadKeyserver(), ring);
|
new ExportKeyringParcel(saveParcel.getUploadKeyserver(),
|
||||||
|
publicKeyRing);
|
||||||
|
|
||||||
ExportResult uploadResult =
|
ExportResult uploadResult =
|
||||||
new ExportOperation(mContext, mProviderHelper, mProgressable)
|
new ExportOperation(mContext, mProviderHelper, mProgressable)
|
||||||
.execute(exportKeyringParcel, cryptoInput);
|
.execute(exportKeyringParcel, cryptoInput);
|
||||||
|
|
||||||
if (uploadResult.isPending()) {
|
if (uploadResult.isPending()) {
|
||||||
return uploadResult;
|
return uploadResult;
|
||||||
} else if (!uploadResult.success() && saveParcel.isUploadAtomic()) {
|
} else if (!uploadResult.success() && saveParcel.isUploadAtomic()) {
|
||||||
|
|||||||
@@ -571,6 +571,8 @@ public abstract class OperationResult implements Parcelable {
|
|||||||
MSG_ED_CACHING_NEW (LogLevel.DEBUG, R.string.msg_ed_caching_new),
|
MSG_ED_CACHING_NEW (LogLevel.DEBUG, R.string.msg_ed_caching_new),
|
||||||
MSG_ED_ERROR_NO_PARCEL (LogLevel.ERROR, R.string.msg_ed_error_no_parcel),
|
MSG_ED_ERROR_NO_PARCEL (LogLevel.ERROR, R.string.msg_ed_error_no_parcel),
|
||||||
MSG_ED_ERROR_KEY_NOT_FOUND (LogLevel.ERROR, R.string.msg_ed_error_key_not_found),
|
MSG_ED_ERROR_KEY_NOT_FOUND (LogLevel.ERROR, R.string.msg_ed_error_key_not_found),
|
||||||
|
MSG_ED_ERROR_EXTRACTING_PUBLIC_UPLOAD (LogLevel.ERROR,
|
||||||
|
R.string.msg_ed_error_extract_public_upload),
|
||||||
MSG_ED_FETCHING (LogLevel.DEBUG, R.string.msg_ed_fetching),
|
MSG_ED_FETCHING (LogLevel.DEBUG, R.string.msg_ed_fetching),
|
||||||
MSG_ED_SUCCESS (LogLevel.OK, R.string.msg_ed_success),
|
MSG_ED_SUCCESS (LogLevel.OK, R.string.msg_ed_success),
|
||||||
|
|
||||||
|
|||||||
@@ -1096,6 +1096,7 @@
|
|||||||
<string name="msg_ed_caching_new">"Caching new password"</string>
|
<string name="msg_ed_caching_new">"Caching new password"</string>
|
||||||
<string name="msg_ed_error_no_parcel">"Missing SaveKeyringParcel! (this is a bug, please report)"</string>
|
<string name="msg_ed_error_no_parcel">"Missing SaveKeyringParcel! (this is a bug, please report)"</string>
|
||||||
<string name="msg_ed_error_key_not_found">"Key not found!"</string>
|
<string name="msg_ed_error_key_not_found">"Key not found!"</string>
|
||||||
|
<string name="msg_ed_error_extract_public_upload">"Error extracting public key for upload!"</string>
|
||||||
<string name="msg_ed_fetching">"Fetching key to modify (%s)"</string>
|
<string name="msg_ed_fetching">"Fetching key to modify (%s)"</string>
|
||||||
<string name="msg_ed_success">"Key operation successful"</string>
|
<string name="msg_ed_success">"Key operation successful"</string>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user