HKP server handling adopted to conform to draft-shaw-openpgp-hkp-00

- updated regex
- added error if server does not implement hkp function
- added algorithm extraction from downloaded key if hkp fails
-- fixes algorithm shown unknown if hkp response field is empty
This commit is contained in:
jatoko
2018-05-23 21:46:30 +02:00
parent 53fa371c9c
commit e965475540
7 changed files with 134 additions and 91 deletions

View File

@@ -18,7 +18,6 @@
package org.sufficientlysecure.keychain.operations.results;
import android.os.Parcel;
import org.sufficientlysecure.keychain.service.input.CryptoInputParcel;
import org.sufficientlysecure.keychain.service.input.RequiredInputParcel;
@@ -51,6 +50,7 @@ public class GetKeyResult extends InputPendingResult {
public static final int RESULT_ERROR_QUERY_FAILED = RESULT_ERROR + (6 << 4);
public static final int RESULT_ERROR_FILE_NOT_FOUND = RESULT_ERROR + (7 << 4);
public static final int RESULT_ERROR_NO_ENABLED_SOURCE = RESULT_ERROR + (8 << 4);
public static final int RESULT_ERROR_QUERY_NOT_IMPLEMENTED = RESULT_ERROR + (9 << 4);
public GetKeyResult(Parcel source) {
super(source);

View File

@@ -23,7 +23,6 @@ import android.content.res.Resources;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.ui.LogDisplayActivity;
import org.sufficientlysecure.keychain.ui.LogDisplayFragment;
@@ -805,6 +804,7 @@ public abstract class OperationResult implements Parcelable {
MSG_GET_TOO_MANY_RESPONSES (LogLevel.ERROR, R.string.msg_get_too_many_responses),
MSG_GET_QUERY_TOO_SHORT_OR_TOO_MANY_RESPONSES (LogLevel.ERROR, R.string.msg_get_query_too_short_or_too_many_responses),
MSG_GET_QUERY_FAILED (LogLevel.ERROR, R.string.msg_download_query_failed),
MSG_GET_QUERY_NOT_IMPLEMENTED (LogLevel.ERROR, R.string.msg_get_query_not_implemented),
MSG_GET_FILE_NOT_FOUND (LogLevel.ERROR, R.string.msg_get_file_not_found),
MSG_GET_NO_ENABLED_SOURCE (LogLevel.ERROR, R.string.msg_get_no_enabled_source),