mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-12 05:00:22 -05:00
fix display of fingerprint in key server query
This commit is contained in:
parent
ecd376961f
commit
9d074b01e9
@ -120,13 +120,15 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
|
|||||||
mainUserIdRest.setVisibility(View.GONE);
|
mainUserIdRest.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: need to set no key?
|
|
||||||
keyId.setText(R.string.no_key);
|
|
||||||
keyId.setText(entry.hexKeyId);
|
keyId.setText(entry.hexKeyId);
|
||||||
fingerprint.setText(mActivity.getString(R.string.fingerprint) + " " + entry.fingerPrint);
|
|
||||||
|
|
||||||
// TODO: no need to set algorithm empty...
|
if (entry.fingerPrint != null) {
|
||||||
algorithm.setText("");
|
fingerprint.setText(mActivity.getString(R.string.fingerprint) + " " + entry.fingerPrint);
|
||||||
|
fingerprint.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
fingerprint.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
algorithm.setText("" + entry.bitStrength + "/" + entry.algorithm);
|
algorithm.setText("" + entry.bitStrength + "/" + entry.algorithm);
|
||||||
|
|
||||||
if (entry.revoked) {
|
if (entry.revoked) {
|
||||||
|
@ -50,6 +50,13 @@ import org.sufficientlysecure.keychain.ui.adapter.ImportKeysListEntry;
|
|||||||
|
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO:
|
||||||
|
* rewrite to use machine readable output.
|
||||||
|
* <p/>
|
||||||
|
* see http://tools.ietf.org/html/draft-shaw-openpgp-hkp-00#section-5
|
||||||
|
* https://github.com/openpgp-keychain/openpgp-keychain/issues/259
|
||||||
|
*/
|
||||||
public class HkpKeyServer extends KeyServer {
|
public class HkpKeyServer extends KeyServer {
|
||||||
private static class HttpError extends Exception {
|
private static class HttpError extends Exception {
|
||||||
private static final long serialVersionUID = 1718783705229428893L;
|
private static final long serialVersionUID = 1718783705229428893L;
|
||||||
@ -181,8 +188,8 @@ public class HkpKeyServer extends KeyServer {
|
|||||||
ImportKeysListEntry info = new ImportKeysListEntry();
|
ImportKeysListEntry info = new ImportKeysListEntry();
|
||||||
info.bitStrength = Integer.parseInt(matcher.group(1));
|
info.bitStrength = Integer.parseInt(matcher.group(1));
|
||||||
info.algorithm = matcher.group(2);
|
info.algorithm = matcher.group(2);
|
||||||
|
info.hexKeyId = "0x" + matcher.group(3);
|
||||||
info.keyId = PgpKeyHelper.convertHexToKeyId(matcher.group(3));
|
info.keyId = PgpKeyHelper.convertHexToKeyId(matcher.group(3));
|
||||||
info.fingerPrint = PgpKeyHelper.convertKeyIdToHex(info.keyId);
|
|
||||||
String chunks[] = matcher.group(4).split("-");
|
String chunks[] = matcher.group(4).split("-");
|
||||||
|
|
||||||
GregorianCalendar tmpGreg = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
|
GregorianCalendar tmpGreg = new GregorianCalendar(TimeZone.getTimeZone("UTC"));
|
||||||
|
Loading…
Reference in New Issue
Block a user