mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-25 00:18:51 -05:00
Rename fingerPrint to fingerprint
This commit is contained in:
parent
73acb69208
commit
b8462de6e5
@ -247,7 +247,7 @@ public class HkpKeyServer extends KeyServer {
|
||||
// see http://bit.ly/1d4bxbk and http://bit.ly/1gD1wwr
|
||||
String fingerprintOrKeyId = matcher.group(1);
|
||||
if (fingerprintOrKeyId.length() > 16) {
|
||||
entry.setFingerPrintHex(fingerprintOrKeyId.toLowerCase(Locale.US));
|
||||
entry.setFingerprintHex(fingerprintOrKeyId.toLowerCase(Locale.US));
|
||||
entry.setKeyIdHex("0x" + fingerprintOrKeyId.substring(fingerprintOrKeyId.length()
|
||||
- 16, fingerprintOrKeyId.length()));
|
||||
} else {
|
||||
|
@ -45,7 +45,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
||||
public String keyIdHex;
|
||||
public boolean revoked;
|
||||
public Date date; // TODO: not displayed
|
||||
public String fingerPrintHex;
|
||||
public String fingerprintHex;
|
||||
public int bitStrength;
|
||||
public String algorithm;
|
||||
public boolean secretKey;
|
||||
@ -67,7 +67,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
||||
dest.writeLong(keyId);
|
||||
dest.writeByte((byte) (revoked ? 1 : 0));
|
||||
dest.writeSerializable(date);
|
||||
dest.writeString(fingerPrintHex);
|
||||
dest.writeString(fingerprintHex);
|
||||
dest.writeString(keyIdHex);
|
||||
dest.writeInt(bitStrength);
|
||||
dest.writeString(algorithm);
|
||||
@ -87,7 +87,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
||||
vr.keyId = source.readLong();
|
||||
vr.revoked = source.readByte() == 1;
|
||||
vr.date = (Date) source.readSerializable();
|
||||
vr.fingerPrintHex = source.readString();
|
||||
vr.fingerprintHex = source.readString();
|
||||
vr.keyIdHex = source.readString();
|
||||
vr.bitStrength = source.readInt();
|
||||
vr.algorithm = source.readString();
|
||||
@ -153,12 +153,12 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public String getFingerPrintHex() {
|
||||
return fingerPrintHex;
|
||||
public String getFingerprintHex() {
|
||||
return fingerprintHex;
|
||||
}
|
||||
|
||||
public void setFingerPrintHex(String fingerPrintHex) {
|
||||
this.fingerPrintHex = fingerPrintHex;
|
||||
public void setFingerprintHex(String fingerprintHex) {
|
||||
this.fingerprintHex = fingerprintHex;
|
||||
}
|
||||
|
||||
public int getBitStrength() {
|
||||
@ -271,7 +271,7 @@ public class ImportKeysListEntry implements Serializable, Parcelable {
|
||||
this.keyIdHex = PgpKeyHelper.convertKeyIdToHex(keyId);
|
||||
|
||||
this.revoked = key.isRevoked();
|
||||
this.fingerPrintHex = PgpKeyHelper.convertFingerprintToHex(key.getFingerprint());
|
||||
this.fingerprintHex = PgpKeyHelper.convertFingerprintToHex(key.getFingerprint());
|
||||
this.bitStrength = key.getBitStrength();
|
||||
final int algorithm = key.getAlgorithm();
|
||||
this.algorithm = PgpKeyHelper.getAlgorithmInfo(context, algorithm);
|
||||
|
@ -802,8 +802,8 @@ public class KeychainIntentService extends IntentService
|
||||
for (ImportKeysListEntry entry : entries) {
|
||||
// if available use complete fingerprint for get request
|
||||
byte[] downloadedKeyBytes;
|
||||
if (entry.getFingerPrintHex() != null) {
|
||||
downloadedKeyBytes = server.get("0x" + entry.getFingerPrintHex()).getBytes();
|
||||
if (entry.getFingerprintHex() != null) {
|
||||
downloadedKeyBytes = server.get("0x" + entry.getFingerprintHex()).getBytes();
|
||||
} else {
|
||||
downloadedKeyBytes = server.get(entry.getKeyIdHex()).getBytes();
|
||||
}
|
||||
@ -829,10 +829,10 @@ public class KeychainIntentService extends IntentService
|
||||
}
|
||||
|
||||
// verify downloaded key by comparing fingerprints
|
||||
if (entry.getFingerPrintHex() != null) {
|
||||
if (entry.getFingerprintHex() != null) {
|
||||
String downloadedKeyFp = PgpKeyHelper.convertFingerprintToHex(
|
||||
downloadedKey.getPublicKey().getFingerprint());
|
||||
if (downloadedKeyFp.equals(entry.getFingerPrintHex())) {
|
||||
if (downloadedKeyFp.equals(entry.getFingerprintHex())) {
|
||||
Log.d(Constants.TAG, "fingerprint of downloaded key is the same as " +
|
||||
"the requested fingerprint!");
|
||||
} else {
|
||||
|
@ -146,9 +146,9 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
|
||||
|
||||
holder.keyId.setText(entry.keyIdHex);
|
||||
|
||||
if (entry.fingerPrintHex != null) {
|
||||
if (entry.fingerprintHex != null) {
|
||||
holder.fingerprint.setVisibility(View.VISIBLE);
|
||||
holder.fingerprint.setText(PgpKeyHelper.colorizeFingerprint(entry.fingerPrintHex));
|
||||
holder.fingerprint.setText(PgpKeyHelper.colorizeFingerprint(entry.fingerprintHex));
|
||||
} else {
|
||||
holder.fingerprint.setVisibility(View.GONE);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class ImportKeysListServerLoader
|
||||
* set fingerprint explicitly after query
|
||||
* to enforce a check when the key is imported by KeychainIntentService
|
||||
*/
|
||||
uniqueEntry.setFingerPrintHex(fingerprint);
|
||||
uniqueEntry.setFingerprintHex(fingerprint);
|
||||
uniqueEntry.setSelected(true);
|
||||
mEntryList.add(uniqueEntry);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user