mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-21 23:32:51 +00:00
Show public key algo
This commit is contained in:
parent
50f2fa4228
commit
469c2de8cd
3 changed files with 33 additions and 0 deletions
|
@ -10142,6 +10142,10 @@ public class FragmentMessages extends FragmentBase
|
|||
EntityCertificate record = db.certificate().getCertificate(fingerprint, email);
|
||||
if (record == null)
|
||||
known = false;
|
||||
else {
|
||||
args.putString("keyalgo", record.getSigAlgName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
String sender = null;
|
||||
|
@ -10407,6 +10411,7 @@ public class FragmentMessages extends FragmentBase
|
|||
boolean valid = args.getBoolean("valid");
|
||||
String reason = args.getString("reason");
|
||||
String algo = args.getString("algo");
|
||||
String keyalgo = args.getString("keyalgo");
|
||||
final ArrayList<String> trace = args.getStringArrayList("trace");
|
||||
EntityCertificate record = EntityCertificate.from(cert, null);
|
||||
|
||||
|
@ -10438,6 +10443,8 @@ public class FragmentMessages extends FragmentBase
|
|||
TextView tvBefore = dview.findViewById(R.id.tvBefore);
|
||||
TextView tvExpired = dview.findViewById(R.id.tvExpired);
|
||||
TextView tvAlgorithm = dview.findViewById(R.id.tvAlgorithm);
|
||||
TextView tvKeyAlgorithmTitle = dview.findViewById(R.id.tvKeyAlgorithmTitle);
|
||||
TextView tvKeyAlgorithm = dview.findViewById(R.id.tvKeyAlgorithm);
|
||||
|
||||
tvCertificateInvalid.setVisibility(valid ? View.GONE : View.VISIBLE);
|
||||
tvCertificateReason.setText(reason);
|
||||
|
@ -10456,6 +10463,12 @@ public class FragmentMessages extends FragmentBase
|
|||
algo = algo.replace("(?i)With", "/");
|
||||
tvAlgorithm.setText(algo);
|
||||
|
||||
tvKeyAlgorithmTitle.setVisibility(info ? View.VISIBLE : View.GONE);
|
||||
if (!TextUtils.isEmpty(keyalgo))
|
||||
keyalgo = keyalgo.replaceAll("(?i)With", "/");
|
||||
tvKeyAlgorithm.setVisibility(info ? View.VISIBLE : View.GONE);
|
||||
tvKeyAlgorithm.setText(keyalgo);
|
||||
|
||||
ibInfo.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
|
@ -183,5 +183,24 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAlgorithmTitle" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvKeyAlgorithmTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/title_signature_public_key"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvExpired" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvKeyAlgorithm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SHA256withRSA"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAlgorithmTitle" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
|
@ -1933,6 +1933,7 @@
|
|||
<string name="title_signature_email">Signature\'s address</string>
|
||||
<string name="title_signature_mismatch">The email address of the sender and signature do not match</string>
|
||||
<string name="title_signature_algorithm">Algorithm</string>
|
||||
<string name="title_signature_public_key">Public key</string>
|
||||
<string name="title_signature_subject">Subject</string>
|
||||
<string name="title_signature_validity">Validity</string>
|
||||
<string name="title_signature_outdated">This public key is currently not valid</string>
|
||||
|
|
Loading…
Reference in a new issue